Documentation ¶
Index ¶
- Variables
- type Component
- type GoroutinePool
- type MockGPool
- func (m *MockGPool) Cap() int32
- func (m *MockGPool) GetOriginConcurrency() int32
- 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() int32
- func (*MockGPool) ShortRTT() uint64
- func (m *MockGPool) Tune(concurrency int32)
- 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) // MaxOverclockCount is the maximum number of overclock goroutine. MaxOverclockCount = int32(1) )
Functions ¶
This section is empty.
Types ¶
type GoroutinePool ¶
type GoroutinePool interface { ReleaseAndWait() Tune(size int32) LastTunerTs() time.Time Cap() int32 Running() int32 Name() string GetOriginConcurrency() int32 }
GoroutinePool is a pool interface
type MockGPool ¶
type MockGPool struct {
// contains filtered or unexported fields
}
MockGPool is only for test
func NewMockGPool ¶
NewMockGPool is only for test
func (*MockGPool) GetOriginConcurrency ¶
GetOriginConcurrency 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.