Documentation ¶
Index ¶
- Constants
- Variables
- func Greater[T Ordered](a, b T) bool
- func GreaterEq[T Ordered](a, b T) bool
- func Less[T Ordered](a, b T) bool
- func LessEq[T Ordered](a, b T) bool
- func OrderedCompare[T Ordered](a, b T) int
- func SetCRCMask(n int)
- type CompareFn
- type ErrHandler
- type ErrorGroupHandler
- type FetchHandler
- type Float
- type GreaterEqFn
- type GreaterFn
- type IComparator
- type IFanOut
- type ILimit
- type IPriorityChan
- type Integer
- type LessEqFn
- type LessFn
- type OrderTuple
- type Ordered
- type PriorityHandler
- type PriorityType
- type Signed
- type Unsigned
- type WaitGroupHandler
Constants ¶
View Source
const Md5 = "md5"
View Source
const Sha1 = "sha1"
Variables ¶
View Source
var CrcMask = uint32(0xffffffff) >> 6
View Source
var ErrorFullChan = errors.New("full chan error")
View Source
var ErrorInvalidParameter = errors.New("invalid parameter")
View Source
var ErrorSliceNotEqualLength = errors.New("two slices not equal length")
View Source
var ErrorTimeout = errors.New("time out error")
Functions ¶
func OrderedCompare ¶ added in v1.0.53
OrderedCompare provide default CompareFn for ordered types.
func SetCRCMask ¶
func SetCRCMask(n int)
Types ¶
type ErrHandler ¶
type ErrHandler func(err any)
type ErrorGroupHandler ¶ added in v1.0.47
type ErrorGroupHandler func() error
type FetchHandler ¶
type GreaterEqFn ¶ added in v1.0.53
GreaterEqFn is a function that returns whether 'a' greater than or equal to 'b'.
type GreaterFn ¶ added in v1.0.53
GreaterFn is a function that returns whether 'a' greater than 'b'.
type IFanOut ¶
type IFanOut[T any] interface { Produce() chan T Compute(chan T) chan T Merge(...chan T) chan T }
type IPriorityChan ¶
type IPriorityChan[T any] interface { Put(event T, t PriorityType) TryPut(event T, t PriorityType) error PutWithTimeout(event T, t PriorityType, timeout time.Duration) error Get() T TryGet() T GetWithTimeout(timeout time.Duration) (T, error) HandleSignal(highHandler PriorityHandler[T], lowHandler PriorityHandler[T]) error }
type LessEqFn ¶ added in v1.0.53
LessEqFn is a function that returns whether 'a' less than or equal to 'b'.
type OrderTuple ¶ added in v1.0.53
OrderTuple 有序元组,用于map的平铺,方便排序
type PriorityHandler ¶
type PriorityType ¶
type PriorityType int
const HighPriorityType PriorityType = 0
const LowPriorityType PriorityType = 1
type WaitGroupHandler ¶
type WaitGroupHandler func()
Click to show internal directories.
Click to hide internal directories.