Documentation ¶
Index ¶
- Constants
- Variables
- 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")
)
Functions ¶
func NewSafeQueue ¶
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.