Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limit ¶
type Limit struct {
// contains filtered or unexported fields
}
Limit 限制并发器,限制最大同时运行的数量
type PriorityChan ¶
type PriorityChan[T any] struct { // contains filtered or unexported fields }
func NewPriorityChan ¶
func NewPriorityChan[T any](size int) *PriorityChan[T]
func (*PriorityChan[T]) GetWithTimeout ¶
func (p *PriorityChan[T]) GetWithTimeout(timeout time.Duration) (T, error)
GetWithTimeout 获取数据,支持超时返回
func (*PriorityChan[T]) HandleSignal ¶
func (p *PriorityChan[T]) HandleSignal(highHandler types.PriorityHandler, lowHandler types.PriorityHandler) error
HandleSignal 通过传入处理函数,处理队列信号
Click to show internal directories.
Click to hide internal directories.