Documentation ¶
Index ¶
- Constants
- Variables
- func NewNonBlockingQueue(queueSize int, batchSize int, onItem OnItemsCB) *safeQueue
- func NewSafeQueue(queueSize, batchSize int, onItem OnItemsCB) *safeQueue
- func NewStateMachine(wg *sync.WaitGroup, closed Closable, rQueue, ckpQueue Queue) *stateMachine
- type Closable
- type ClosedState
- type EnqueueOp
- type Loop
- type OnFinCB
- type OnItemsCB
- type Queue
- type StateMachine
Constants ¶
View Source
const ( Created int32 = iota Running ReceiverStopped PrepareStop Stopped )
Variables ¶
View Source
var ( ErrClose = moerr.NewInternalErrorNoCtx("closed") ErrFull = moerr.NewInternalErrorNoCtx("nonblocking queue is full, dropped item") )
Functions ¶
func NewNonBlockingQueue ¶ added in v1.0.0
func NewSafeQueue ¶
NewSafeQueue is blocking queue by default
Types ¶
type ClosedState ¶ added in v0.8.0
type ClosedState struct {
// contains filtered or unexported fields
}
func (*ClosedState) IsClosed ¶ added in v0.8.0
func (c *ClosedState) IsClosed() bool
func (*ClosedState) TryClose ¶ added in v0.8.0
func (c *ClosedState) TryClose() bool
Click to show internal directories.
Click to hide internal directories.