buildRoleName builds the role name with the given instance ID and role name.
(b *strings.Builder, instanceID, roleName string)
| 36 | |
| 37 | // buildRoleName builds the role name with the given instance ID and role name. |
| 38 | func buildRoleName(b *strings.Builder, instanceID, roleName string) string { |
| 39 | b.Reset() |
| 40 | _, _ = b.WriteString(common.InstanceNamePrefix) |
| 41 | _, _ = b.WriteString(instanceID) |
| 42 | _, _ = b.WriteString("/") |
| 43 | _, _ = b.WriteString(common.RolePrefix) |
| 44 | _, _ = b.WriteString(roleName) |
| 45 | return b.String() |
| 46 | } |
| 47 | |
| 48 | func convertInstanceRoles(instance *store.InstanceMessage, roles []*storepb.InstanceRole) []*v1pb.InstanceRole { |
| 49 | var v1Roles []*v1pb.InstanceRole |
no test coverage detected