Documentation ¶
Index ¶
- Constants
- func CheckOrgID(orgID int) bool
- func Concat[S ~[]E, E any](slices ...S) S
- func ConvertStrToU32List(convertStr string) ([]uint32, error)
- func Find[T Number](slice []T, val T) bool
- func GetWaitGroupInCtx(ctx context.Context) *sync.WaitGroup
- func Grow[S ~[]E, E any](s S, n int) S
- func IsVMofBMHtype(htype int) bool
- func Lookup(host net.IP) (net.IP, error)
- func MacStrToU64(mac string) (uint64, error)
- func MaxTime(t1 time.Time, t2 time.Time) time.Time
- func NewWaitGroupCtx() (context.Context, context.CancelFunc)
- func SliceEqual[T Number](a, b []T) bool
- type Counter
- type KeyValue
- type Number
- type ORGID
- type U128IDMap
- func (m *U128IDMap) AddOrGet(key0, key1 uint64, value interface{}, overwrite bool) (interface{}, bool)
- func (m *U128IDMap) AddOrGetWithSlice(key []byte, _ uint32, value interface{}, overwrite bool) (interface{}, bool)
- func (m *U128IDMap) Clear()
- func (m *U128IDMap) Close() error
- func (m *U128IDMap) Get(key0, key1 uint64) (interface{}, bool)
- func (m *U128IDMap) GetCollisionChain() []byte
- func (m *U128IDMap) GetCounter() interface{}
- func (m *U128IDMap) GetWithSlice(key []byte, _ uint32) (interface{}, bool)
- func (m *U128IDMap) ID() string
- func (m *U128IDMap) Iter() <-chan KeyValue
- func (m *U128IDMap) KeySize() int
- func (m *U128IDMap) NoStats() *U128IDMap
- func (m *U128IDMap) SetCollisionChainDebugThreshold(t int)
- func (m *U128IDMap) Size() int
- func (m *U128IDMap) Width() int
Constants ¶
View Source
const ORG_ID_INDEX_MAX = common.ORG_ID_MAX + 1 // 0 index not used
Variables ¶
This section is empty.
Functions ¶
func CheckOrgID ¶
func ConvertStrToU32List ¶
func IsVMofBMHtype ¶
func MacStrToU64 ¶
func NewWaitGroupCtx ¶
func NewWaitGroupCtx() (context.Context, context.CancelFunc)
func SliceEqual ¶
Types ¶
type U128IDMap ¶
注意:不是线程安全的
func NewU128IDMap ¶
func NewU128IDMap(module string, hashSlots uint32, opts ...stats.OptionStatTags) *U128IDMap
func NewU128IDMapNoStats ¶
func (*U128IDMap) AddOrGet ¶
func (m *U128IDMap) AddOrGet(key0, key1 uint64, value interface{}, overwrite bool) (interface{}, bool)
第一个返回值表示value,第二个返回值表示是否进行了Add。若key已存在,指定overwrite=true可覆写value。
func (*U128IDMap) AddOrGetWithSlice ¶
func (*U128IDMap) GetCollisionChain ¶
func (*U128IDMap) GetCounter ¶
func (m *U128IDMap) GetCounter() interface{}
func (*U128IDMap) GetWithSlice ¶
func (*U128IDMap) SetCollisionChainDebugThreshold ¶
Click to show internal directories.
Click to hide internal directories.