limits

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package limits package

Index

Constants

This section is empty.

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

type MockLimitChecker struct {
	mock.Mock
}

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"
	ResourceLimitVersionsPerTerraformModule                   ResourceLimitName = "ResourceLimitVersionsPerTerraformModule"
	ResourceLimitAttestationsPerTerraformModule               ResourceLimitName = "ResourceLimitAttestationsPerTerraformModule"
	ResourceLimitTerraformProvidersPerGroup                   ResourceLimitName = "ResourceLimitTerraformProvidersPerGroup"
	ResourceLimitVersionsPerTerraformProvider                 ResourceLimitName = "ResourceLimitVersionsPerTerraformProvider"
	ResourceLimitPlatformsPerTerraformProviderVersion         ResourceLimitName = "ResourceLimitPlatformsPerTerraformProviderVersion"
	ResourceLimitVCSProvidersPerGroup                         ResourceLimitName = "ResourceLimitVCSProvidersPerGroup"
	ResourceLimitTerraformProviderVersionMirrorsPerGroup      ResourceLimitName = "ResourceLimitTerraformProviderVersionMirrorsPerGroup"
	ResourceLimitRunnerSessionsPerRunner                      ResourceLimitName = "ResourceLimitRunnerSessionsPerRunner"
)

ResourceLimitName constants

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL