Documentation ¶
Index ¶
- func IsChannelClosed(err error) bool
- func SendToChannel(send func())
- type Bool
- type BoolWaiter
- type Broadcast
- type Cond
- type InitOnceWithError
- type Int
- type MapStringString
- type MemoryObjectPool
- type MemoryObjectPoolEntry
- type MemoryObjectPoolRequest
- type MemoryObjectPoolWithCpuNumber
- type NumIdAlloc
- type OneInstance
- type OneInstanceMap
- type Rc
- type SetString
- type String
- type StringMutexMap
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsChannelClosed ¶
func SendToChannel ¶
func SendToChannel(send func())
Types ¶
type BoolWaiter ¶
type BoolWaiter struct {
// contains filtered or unexported fields
}
func (*BoolWaiter) Get ¶
func (bw *BoolWaiter) Get() bool
func (*BoolWaiter) Set ¶
func (bw *BoolWaiter) Set(b bool)
func (*BoolWaiter) Wait ¶
func (bw *BoolWaiter) Wait(needStatus bool)
func (*BoolWaiter) WaitTrueWithTimeout ¶
func (bw *BoolWaiter) WaitTrueWithTimeout(dur time.Duration) bool
func (*BoolWaiter) WaitWithTimeout ¶
func (bw *BoolWaiter) WaitWithTimeout(needStatus bool, dur time.Duration) bool
type Broadcast ¶
type Broadcast struct {
// contains filtered or unexported fields
}
func NewBroadcast ¶
func NewBroadcast() *Broadcast
func (*Broadcast) WaitWithCb ¶
func (*Broadcast) WaitWithVersion ¶
type Cond ¶
type Cond struct {
// contains filtered or unexported fields
}
func (*Cond) InLockAndSignal ¶
func (c *Cond) InLockAndSignal(f func())
func (*Cond) WaitCheckAndDo ¶
type InitOnceWithError ¶
type InitOnceWithError struct {
// contains filtered or unexported fields
}
func (*InitOnceWithError) Do ¶
func (once *InitOnceWithError) Do(fn func() (errS string)) (errS string)
func (*InitOnceWithError) HasInitSucc ¶
func (once *InitOnceWithError) HasInitSucc() bool
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
func (*Int) AddAndReturnNew ¶
type MapStringString ¶
type MapStringString struct {
// contains filtered or unexported fields
}
func (*MapStringString) Get ¶
func (m *MapStringString) Get(k string) string
func (*MapStringString) Set ¶
func (m *MapStringString) Set(k string, v string)
type MemoryObjectPool ¶
type MemoryObjectPool struct {
// contains filtered or unexported fields
}
func NewMemoryObjectPool ¶
func NewMemoryObjectPool(req MemoryObjectPoolRequest) *MemoryObjectPool
func (*MemoryObjectPool) Go ¶
func (pool *MemoryObjectPool) Go(job func(obj interface{}))
type MemoryObjectPoolEntry ¶
type MemoryObjectPoolEntry struct {
Obj interface{}
}
type MemoryObjectPoolRequest ¶
type MemoryObjectPoolRequest struct { MaxEntryNumber int NewObjectFn func() interface{} }
type MemoryObjectPoolWithCpuNumber ¶
type MemoryObjectPoolWithCpuNumber struct {
// contains filtered or unexported fields
}
func (*MemoryObjectPoolWithCpuNumber) Go ¶
func (pool2 *MemoryObjectPoolWithCpuNumber) Go(job func(entry *MemoryObjectPoolEntry))
type NumIdAlloc ¶
type NumIdAlloc struct {
// contains filtered or unexported fields
}
func (*NumIdAlloc) AllocId ¶
func (alloc *NumIdAlloc) AllocId() int
func (*NumIdAlloc) MustFreeId ¶
func (alloc *NumIdAlloc) MustFreeId(id int)
type OneInstance ¶
type OneInstance struct { Name string // contains filtered or unexported fields }
func (*OneInstance) IsRun ¶
func (oi *OneInstance) IsRun() (isRun bool)
func (*OneInstance) MustRun ¶
func (oi *OneInstance) MustRun(fn func())
func (*OneInstance) MustStart ¶
func (oi *OneInstance) MustStart()
func (*OneInstance) MustStop ¶
func (oi *OneInstance) MustStop()
func (*OneInstance) Run ¶
func (oi *OneInstance) Run(fn func()) bool
func (*OneInstance) RunAndLogIfNotRun ¶
func (oi *OneInstance) RunAndLogIfNotRun(fn func())
type OneInstanceMap ¶
type OneInstanceMap struct {
// contains filtered or unexported fields
}
func (*OneInstanceMap) IsRunning ¶
func (m *OneInstanceMap) IsRunning(key string) bool
func (*OneInstanceMap) Run ¶
func (m *OneInstanceMap) Run(key string, fn func()) bool
type SetString ¶
type SetString struct {
// contains filtered or unexported fields
}
func (*SetString) GetStringSliceAndClear ¶
type StringMutexMap ¶
type StringMutexMap struct {
// contains filtered or unexported fields
}
func (*StringMutexMap) LockByString ¶
func (m *StringMutexMap) LockByString(s string)
func (*StringMutexMap) UnlockByString ¶
func (m *StringMutexMap) UnlockByString(s string)
Click to show internal directories.
Click to hide internal directories.