Documentation ¶
Index ¶
Constants ¶
View Source
const TxThrottlerName = "TransactionThrottler"
TxThrottlerName is the name the wrapped go/vt/throttler object will be registered with go/vt/throttler.GlobalManager.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThrottlerInterface ¶
type ThrottlerInterface interface { Throttle(threadID int) time.Duration ThreadFinished(threadID int) Close() MaxRate() int64 SetMaxRate(rate int64) RecordReplicationLag(time time.Time, th *discovery.TabletHealth) GetConfiguration() *throttlerdatapb.Configuration UpdateConfiguration(configuration *throttlerdatapb.Configuration, copyZeroValues bool) error ResetConfiguration() MaxLag(tabletType topodatapb.TabletType) uint32 }
ThrottlerInterface defines the public interface that is implemented by go/vt/throttler.Throttler It is only used here to allow mocking out a throttler object.
type TxThrottler ¶
type TxThrottler interface { InitDBConfig(target *querypb.Target) Open() (err error) Close() Throttle(priority int, workload string) (result bool) }
TxThrottler defines the interface for the transaction throttler.
func NewTxThrottler ¶
func NewTxThrottler(env tabletenv.Env, topoServer *topo.Server) TxThrottler
NewTxThrottler tries to construct a txThrottler from the relevant fields in the tabletenv.Env and topo.Server objects.
Click to show internal directories.
Click to hide internal directories.