package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
NewTenantSideCostController creates an object which implements the server.TenantSideCostController interface.
TestingAvailableTokens returns the current number of available tokens in the tenant's token bucket, for testing purposes.
TestingSetRate sets the fill rate of the tenant's token bucket, for testing purposes.
TestingTenantSideCostController is a testing variant of NewTenantSideCostController which allows using a specified TimeSource.
TestingTokenBucketString returns a string representation of the tenant's token bucket, for testing purposes.
# Constants
LowTokensNotification indicates that the main loop handled a "low RU" notification from the token bucket.
MainLoopStarted indicates that the main loop has finished initializing the controller and is waiting for work.
TickProcessed indicates that the main loop completed the processing of a tick.
TokenBucketResponseError indicates that a request to the global token bucket has failed.
TokenBucketResponseProcessed indicates that we have processed a (successful) request to the global token bucket.
# Variables
CPUUsageAllowance is exported for testing purposes.
InitialRequestSetting is exported for testing purposes.
ProvisionedVcpusSetting is the number of estimated vCPUs that are available for the virtual cluster to use.
TargetPeriodSetting is exported for testing purposes.
# Interfaces
TestInstrumentation is used by tests to listen for tenant controller events.
# Type aliases
TestEventType indicates the type of an event reported through TestInstrumentation.