Documentation ¶
Index ¶
- Variables
- type Component
- type GoroutinePool
- type MockGPool
- func (*MockGPool) Cap() int
- func (*MockGPool) GetQueueSize() int64
- func (*MockGPool) InFlight() int64
- func (*MockGPool) LastTunerTs() time.Time
- func (*MockGPool) LongRTT() float64
- func (*MockGPool) MaxInFlight() int64
- func (*MockGPool) MaxPASS() uint64
- func (*MockGPool) MinRT() uint64
- func (m *MockGPool) Name() string
- func (*MockGPool) ReleaseAndWait()
- func (*MockGPool) Running() int
- func (*MockGPool) ShortRTT() uint64
- func (*MockGPool) Tune(_ int)
- func (*MockGPool) UpdateLongRTT(_ func(float64) float64)
- type PoolContainer
- type ShardPoolMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MinSchedulerInterval is the minimum interval between two scheduling. MinSchedulerInterval = atomic.NewDuration(200 * time.Millisecond) )
Functions ¶
This section is empty.
Types ¶
type GoroutinePool ¶
type GoroutinePool interface { ReleaseAndWait() Tune(size int) LastTunerTs() time.Time Cap() int Running() int Name() string }
GoroutinePool is a pool interface
type MockGPool ¶
type MockGPool struct {
// contains filtered or unexported fields
}
MockGPool is only for test
func (*MockGPool) GetQueueSize ¶
GetQueueSize is only for test
func (*MockGPool) LastTunerTs ¶
LastTunerTs is only for test
func (*MockGPool) LongRTT ¶
LongRTT is to represent the baseline latency by tracking a measurement of the long term, less volatile RTT.
func (*MockGPool) ReleaseAndWait ¶
func (*MockGPool) ReleaseAndWait()
ReleaseAndWait is only for test
func (*MockGPool) ShortRTT ¶
ShortRTT is to represent the current system latency by tracking a measurement of the short time, and more volatile RTT.
func (*MockGPool) UpdateLongRTT ¶
UpdateLongRTT is only for test
type PoolContainer ¶
type PoolContainer struct { Pool GoroutinePool Component Component }
PoolContainer is a pool container
type ShardPoolMap ¶
type ShardPoolMap struct {
// contains filtered or unexported fields
}
ShardPoolMap is a map with shard
func NewShardPoolMap ¶
func NewShardPoolMap() *ShardPoolMap
NewShardPoolMap creates a shard pool map
func (*ShardPoolMap) Add ¶
func (s *ShardPoolMap) Add(key string, pool *PoolContainer) error
Add adds a pool to the map
func (*ShardPoolMap) Iter ¶
func (s *ShardPoolMap) Iter(fn func(pool *PoolContainer))
Iter iterates the map
Click to show internal directories.
Click to hide internal directories.