Merge pull request #85 from justinsb/match_service_by_type_not_name
Support matching by type in the service catalog
diff --git a/service_catalog.go b/service_catalog.go
index 326f653..a439935 100644
--- a/service_catalog.go
+++ b/service_catalog.go
@@ -11,6 +11,9 @@
// Name specifies the desired service catalog entry name.
Name string
+ // Type specifies the desired service catalog entry type.
+ Type string
+
// Region specifies the desired endpoint region.
Region string
@@ -45,6 +48,10 @@
continue
}
+ if (ac.Type != "") && (ac.Type != entry.Type) {
+ continue
+ }
+
for _, endpoint := range entry.Endpoints {
if (ac.Region != "") && (rgn != strings.ToUpper(endpoint.Region)) {
continue