Refine serialized service/category
Refine the persisted service/category slightly by making it so we can break them apart again during deserialization. Should be squashed into a previous commit.
This commit is contained in:
parent
e38ecc38fe
commit
d1fba10aeb
@ -25,6 +25,7 @@ const (
|
|||||||
tenantIDKey = "tenant"
|
tenantIDKey = "tenant"
|
||||||
resourceIDKey = "resource"
|
resourceIDKey = "resource"
|
||||||
serviceCatPrefix = "sc-"
|
serviceCatPrefix = "sc-"
|
||||||
|
separator = "_"
|
||||||
|
|
||||||
// Sentinel value for tags. Could technically be empty but we'll store
|
// Sentinel value for tags. Could technically be empty but we'll store
|
||||||
// something for now.
|
// something for now.
|
||||||
@ -36,7 +37,7 @@ func serviceCatString(
|
|||||||
service path.ServiceType,
|
service path.ServiceType,
|
||||||
category path.CategoryType,
|
category path.CategoryType,
|
||||||
) string {
|
) string {
|
||||||
return serviceCatPrefix + service.String() + category.String()
|
return serviceCatPrefix + service.String() + separator + category.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// reasonTags returns the set of key-value pairs that can be used as tags to
|
// reasonTags returns the set of key-value pairs that can be used as tags to
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user