GetActivatedInstanceLimit returns the activated instance limit for the current subscription.
(ctx context.Context, workspaceID string)
| 357 | |
| 358 | // GetActivatedInstanceLimit returns the activated instance limit for the current subscription. |
| 359 | func (s *LicenseService) GetActivatedInstanceLimit(ctx context.Context, workspaceID string) int { |
| 360 | limit := s.LoadSubscription(ctx, workspaceID).ActiveInstances |
| 361 | if limit < 0 { |
| 362 | return math.MaxInt |
| 363 | } |
| 364 | return int(limit) |
| 365 | } |
| 366 | |
| 367 | func isUnifiedInstanceLimit(instanceLimit, activatedInstanceLimit int) bool { |
| 368 | return instanceLimit <= activatedInstanceLimit |
no test coverage detected