Documentation ¶
Index ¶
- func CalculateMemLimit(maxMemRate float64) int
- func GetCPULimitNum(maxCPURate float64) int
- func GetMetricPrimaryKey(endpoint, metric string, tags map[string]string) string
- func Md5(raw string) string
- func ReformatMetricUniqueString(endpoint, metric string, tags map[string]string, dsType string, step int) string
- func ReformatTag(str string) map[string]string
- func SortedTags(tags map[string]string) string
- func UnixTsFormat(ts int64) string
- type List
- func (u *List) BackAll() []interface{}
- func (u *List) Front() interface{}
- func (u *List) FrontAll() []interface{}
- func (u *List) Len() int
- func (u *List) PopBack() interface{}
- func (u *List) PopBackAll() []interface{}
- func (u *List) PopBackBy(max int) []interface{}
- func (u *List) PushFront(v interface{}) *list.Element
- func (u *List) PushFrontBatch(vs []interface{})
- func (u *List) Remove(e *list.Element) interface{}
- func (u *List) RemoveAll()
- type ListLimited
- func (u *ListLimited) Front() interface{}
- func (u *ListLimited) FrontAll() []interface{}
- func (u *ListLimited) Len() int
- func (u *ListLimited) PopBack() interface{}
- func (u *ListLimited) PopBackBy(max int) []interface{}
- func (u *ListLimited) PushFront(v interface{}) bool
- func (u *ListLimited) PushFrontBatch(vs []interface{}) bool
- func (u *ListLimited) PushFrontViolently(v interface{}) bool
- func (u *ListLimited) RemoveAll()
- type SafeSet
- type Semaphore
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateMemLimit ¶
func GetCPULimitNum ¶
func GetMetricPrimaryKey ¶
func ReformatTag ¶
func SortedTags ¶
func UnixTsFormat ¶
Types ¶
type List ¶
func NewSafeList ¶
func NewSafeList() *List
func (*List) PopBackAll ¶
func (u *List) PopBackAll() []interface{}
func (*List) PushFrontBatch ¶
func (u *List) PushFrontBatch(vs []interface{})
type ListLimited ¶
type ListLimited struct { SL *List // contains filtered or unexported fields }
SafeList with Limited Size
func NewSafeListLimited ¶
func NewSafeListLimited(maxSize int) *ListLimited
func (*ListLimited) Front ¶
func (u *ListLimited) Front() interface{}
func (*ListLimited) FrontAll ¶
func (u *ListLimited) FrontAll() []interface{}
func (*ListLimited) Len ¶
func (u *ListLimited) Len() int
func (*ListLimited) PopBack ¶
func (u *ListLimited) PopBack() interface{}
func (*ListLimited) PopBackBy ¶
func (u *ListLimited) PopBackBy(max int) []interface{}
func (*ListLimited) PushFront ¶
func (u *ListLimited) PushFront(v interface{}) bool
func (*ListLimited) PushFrontBatch ¶
func (u *ListLimited) PushFrontBatch(vs []interface{}) bool
func (*ListLimited) PushFrontViolently ¶
func (u *ListLimited) PushFrontViolently(v interface{}) bool
func (*ListLimited) RemoveAll ¶
func (u *ListLimited) RemoveAll()
type SafeSet ¶
func NewSafeSet ¶
func NewSafeSet() *SafeSet
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
func (*Semaphore) AvailablePermits ¶
func (*Semaphore) TryAcquire ¶
Click to show internal directories.
Click to hide internal directories.