MCPcopy
hub / github.com/apecloud/kubeblocks / verifyServiceVersion

Function verifyServiceVersion

pkg/controller/component/service_reference.go:338–348  ·  view source on GitHub ↗
(serviceDescriptorVersion, serviceRefDeclarationServiceVersion string)

Source from the content-addressed store, hash-verified

336}
337
338func verifyServiceVersion(serviceDescriptorVersion, serviceRefDeclarationServiceVersion string) bool {
339 isRegex := false
340 regex, err := regexp.Compile(serviceRefDeclarationServiceVersion)
341 if err == nil {
342 isRegex = true
343 }
344 if !isRegex {
345 return serviceDescriptorVersion == serviceRefDeclarationServiceVersion
346 }
347 return regex.MatchString(serviceDescriptorVersion)
348}
349
350func getWellKnownServiceKindAliasMapping(serviceKind string) string {
351 lowerServiceKind := strings.ToLower(serviceKind)

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…