Documentation ¶
Index ¶
Constants ¶
const ( SequenceMax int64 = (1 << 63) - 1 SequenceDefault int64 = -1 // For iinitiializing seq and commit buffer )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeqMulti ¶
type SeqMulti struct {
// contains filtered or unexported fields
}
SeqMulti is used by multiple thread/go routines for tracking a Ring Buffer.
func SeqMultiNew ¶
Factory function for returning a new instance of a SeqMulti.
func (*SeqMulti) Commit ¶
Commit updates the committed map to track that a segment in the ring buffer has been allocated and used.
func (*SeqMulti) Reserve ¶
Reserve returns the upper most index for a segment of cells requested by "size".
func (*SeqMulti) SetDependency ¶
SetDependency is a setter for the dependency of this sequence.
type SeqSimple ¶
type SeqSimple struct {
// contains filtered or unexported fields
}
SeqSimple is a hub for a single thread/go routine to track access to a ring buffer.
func SeqSimpleNew ¶
Factory function for returning a new instance of a SeqSimple.
func (*SeqSimple) Commit ¶
Commit updates the committed map to track that a segment in the ring buffer has been allocated and used.
func (*SeqSimple) Reserve ¶
Reserve incrmenets and returns the upper most index for a cell to fill or read.
func (*SeqSimple) SetDependency ¶
SetDependency is a setter for the dependency of this sequence.
type SequenceManager ¶
SequenceManager is a simple wrapper around the various compoments for managing a ringbuffer.
func SequenceManagerNew ¶
func SequenceManagerNew(size int64) *SequenceManager
SequenceManagerNew instatiates and returns a new Manager.