MCPcopy Create free account
hub / github.com/bytebase/bytebase / IsUnifiedInstanceLicense

Method IsUnifiedInstanceLicense

backend/enterprise/license.go:372–377  ·  view source on GitHub ↗

IsUnifiedInstanceLicense returns whether every registrable instance is effectively activated.

(ctx context.Context, workspaceID string)

Source from the content-addressed store, hash-verified

370
371// IsUnifiedInstanceLicense returns whether every registrable instance is effectively activated.
372func (s *LicenseService) IsUnifiedInstanceLicense(ctx context.Context, workspaceID string) bool {
373 return isUnifiedInstanceLimit(
374 s.GetInstanceLimit(ctx, workspaceID),
375 s.GetActivatedInstanceLimit(ctx, workspaceID),
376 )
377}
378
379// IsInstanceEffectivelyActivated returns whether the instance can use instance-gated features.
380func (s *LicenseService) IsInstanceEffectivelyActivated(ctx context.Context, workspaceID string, instance *store.InstanceMessage) bool {

Callers 3

getServerInfoMethod · 0.80
checkActivationLimitMethod · 0.80

Calls 3

GetInstanceLimitMethod · 0.95
isUnifiedInstanceLimitFunction · 0.85

Tested by

no test coverage detected