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:
Ashlie Martinez 2023-10-04 15:54:09 -07:00
parent e38ecc38fe
commit d1fba10aeb

View File

@ -25,6 +25,7 @@ const (
tenantIDKey = "tenant"
resourceIDKey = "resource"
serviceCatPrefix = "sc-"
separator = "_"
// Sentinel value for tags. Could technically be empty but we'll store
// something for now.
@ -36,7 +37,7 @@ func serviceCatString(
service path.ServiceType,
category path.CategoryType,
) 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