Documentation ¶
Overview ¶
Package limits package
Index ¶
Constants ¶
View Source
const ( // ResourceLimitTimePeriod is the time period used for time-based resource limits. // Only resources created within the last time period will account towards the limit. ResourceLimitTimePeriod = 1 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LimitChecker ¶
type LimitChecker interface {
CheckLimit(ctx context.Context, name ResourceLimitName, toCheck int32) error
}
LimitChecker implements functionality related to resource limits.
func NewLimitChecker ¶
func NewLimitChecker( dbClient *db.Client, ) LimitChecker
NewLimitChecker creates an instance of LimitChecker
type MockLimitChecker ¶ added in v0.16.0
MockLimitChecker is an autogenerated mock type for the LimitChecker type
func NewMockLimitChecker ¶ added in v0.16.0
func NewMockLimitChecker(t mockConstructorTestingTNewMockLimitChecker) *MockLimitChecker
NewMockLimitChecker creates a new instance of MockLimitChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockLimitChecker) CheckLimit ¶ added in v0.16.0
func (_m *MockLimitChecker) CheckLimit(ctx context.Context, name ResourceLimitName, toCheck int32) error
CheckLimit provides a mock function with given fields: ctx, name, toCheck
type ResourceLimitName ¶
type ResourceLimitName string
ResourceLimitName is an enum for the names that will be used as keys when doing the checks.
const ( ResourceLimitSubgroupsPerParent ResourceLimitName = "ResourceLimitSubgroupsPerParent" ResourceLimitGroupTreeDepth ResourceLimitName = "ResourceLimitGroupTreeDepth" ResourceLimitWorkspacesPerGroup ResourceLimitName = "ResourceLimitWorkspacesPerGroup" ResourceLimitServiceAccountsPerGroup ResourceLimitName = "ResourceLimitServiceAccountsPerGroup" ResourceLimitRunnerAgentsPerGroup ResourceLimitName = "ResourceLimitRunnerAgentsPerGroup" ResourceLimitVariablesPerNamespace ResourceLimitName = "ResourceLimitVariablesPerNamespace" ResourceLimitGPGKeysPerGroup ResourceLimitName = "ResourceLimitGPGKeysPerGroup" ResourceLimitManagedIdentitiesPerGroup ResourceLimitName = "ResourceLimitManagedIdentitiesPerGroup" ResourceLimitManagedIdentityAliasesPerManagedIdentity ResourceLimitName = "ResourceLimitManagedIdentityAliasesPerManagedIdentity" ResourceLimitAssignedManagedIdentitiesPerWorkspace ResourceLimitName = "ResourceLimitAssignedManagedIdentitiesPerWorkspace" ResourceLimitManagedIdentityAccessRulesPerManagedIdentity ResourceLimitName = "ResourceLimitManagedIdentityAccessRulesPerManagedIdentity" ResourceLimitTerraformModulesPerGroup ResourceLimitName = "ResourceLimitTerraformModulesPerGroup" ResourceLimitVersionsPerTerraformModulePerTimePeriod ResourceLimitName = "ResourceLimitVersionsPerTerraformModulePerTimePeriod" ResourceLimitAttestationsPerTerraformModulePerTimePeriod ResourceLimitName = "ResourceLimitAttestationsPerTerraformModulePerTimePeriod" ResourceLimitTerraformProvidersPerGroup ResourceLimitName = "ResourceLimitTerraformProvidersPerGroup" ResourceLimitVersionsPerTerraformProviderPerTimePeriod ResourceLimitName = "ResourceLimitVersionsPerTerraformProviderPerTimePeriod" ResourceLimitPlatformsPerTerraformProviderVersion ResourceLimitName = "ResourceLimitPlatformsPerTerraformProviderVersion" ResourceLimitVCSProvidersPerGroup ResourceLimitName = "ResourceLimitVCSProvidersPerGroup" ResourceLimitTerraformProviderVersionMirrorsPerGroup ResourceLimitName = "ResourceLimitTerraformProviderVersionMirrorsPerGroup" ResourceLimitRunnerSessionsPerRunner ResourceLimitName = "ResourceLimitRunnerSessionsPerRunner" ResourceLimitRunsPerWorkspacePerTimePeriod ResourceLimitName = "ResourceLimitRunsPerWorkspacePerTimePeriod" ResourceLimitConfigurationVersionsPerWorkspacePerTimePeriod ResourceLimitName = "ResourceLimitConfigurationVersionsPerWorkspacePerTimePeriod" ResourceLimitStateVersionsPerWorkspacePerTimePeriod ResourceLimitName = "ResourceLimitStateVersionsPerWorkspacePerTimePeriod" )
ResourceLimitName constants
Click to show internal directories.
Click to hide internal directories.