Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentMap ¶
func NewConcurrentMap ¶
func NewConcurrentMap() *ConcurrentMap
func (*ConcurrentMap) Delete ¶
func (m *ConcurrentMap) Delete(key string)
func (*ConcurrentMap) Get ¶
func (m *ConcurrentMap) Get(key string) (interface{}, bool)
func (*ConcurrentMap) Keys ¶
func (m *ConcurrentMap) Keys() []string
func (*ConcurrentMap) Set ¶
func (m *ConcurrentMap) Set(key string, value interface{})
type GlobalRegistry ¶
type GlobalRegistry struct { Registry *ConcurrentMap RingBuffer *RingBuffer TimerWheel *TimerWheel }
func NewGlobalRegistry ¶
func NewGlobalRegistry() *GlobalRegistry
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer 是环形缓冲区结构体
type TimerWheel ¶
type TimerWheel struct {
// contains filtered or unexported fields
}
func NewTimerWheel ¶
func NewTimerWheel(interval time.Duration, size int) *TimerWheel
func (*TimerWheel) AddTimer ¶
func (tw *TimerWheel) AddTimer(d time.Duration, f func())
func (*TimerWheel) Run ¶
func (tw *TimerWheel) Run()
func (*TimerWheel) Stop ¶
func (tw *TimerWheel) Stop()
Click to show internal directories.
Click to hide internal directories.