Documentation
¶
Index ¶
- Constants
- type Queue
- func (q *Queue) Ack(lastOffset *event.Offset)
- func (q *Queue) Close() error
- func (q *Queue) DefaultConfig() string
- func (q *Queue) Dequeue() (*api.SequenceEvent, error)
- func (q *Queue) Description() string
- func (q *Queue) Enqueue(e *v1.SniffData) error
- func (q *Queue) GetIndex(segmentID int64) int
- func (q *Queue) GetSegment(segmentID int64) (*mmap.File, error)
- func (q *Queue) Initialize() error
- func (q *Queue) IsFull() bool
- func (q *Queue) Name() string
- func (q *Queue) ShowName() string
- func (q *Queue) TotalSize() int64
- func (q *Queue) UsedCount() int64
Constants ¶
View Source
const ( Name = "mmap-queue" ShowName = "Mmap Queue" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct { config.CommonFields SegmentSize int `mapstructure:"segment_size"` // The size of each segment. The unit is byte. MaxInMemSegments int32 `mapstructure:"max_in_mem_segments"` // The max num of segments in memory. QueueCapacitySegments int `mapstructure:"queue_capacity_segments"` // The capacity of Queue = segment_size * queue_capacity_segments. FlushPeriod int `mapstructure:"flush_period"` // The period flush time. The unit is ms. FlushCeilingNum int `mapstructure:"flush_ceiling_num"` // The max number in one flush time. MaxEventSize int `mapstructure:"max_event_size"` // The max size of the input event. // contains filtered or unexported fields }
Queue is a memory mapped queue to store the input data.
func (*Queue) DefaultConfig ¶
func (*Queue) Description ¶
func (*Queue) GetSegment ¶
GetSegment returns a memory mapped file at the segmentID position.
func (*Queue) Initialize ¶
Click to show internal directories.
Click to hide internal directories.