MCPcopy
hub / github.com/lindb/lindb / queue

Struct queue

pkg/queue/queue.go:83–100  ·  view source on GitHub ↗

queue implements queue.

Source from the content-addressed store, hash-verified

81
82// queue implements queue.
83type queue struct {
84 indexPage page.MappedPage // index buffer
85 dataPage page.MappedPage // data buffer
86 indexPageFct page.Factory // index page factory
87 dataPageFct page.Factory // data page factory
88 metaPage page.MappedPage // meta buffer
89 metaPageFct page.Factory // meta page factory
90 notEmpty *sync.Cond // not empty condition
91 rwMutex *sync.RWMutex
92 dirPath string // path for queue file
93 appendedSeq atomic.Int64 // current written sequence
94 dataPageIndex int64
95 indexPageIndex int64
96 messageOffset int
97 closed atomic.Bool
98 acknowledgedSeq atomic.Int64 // acknowledged sequence
99 pageSize int64 // data page size
100}
101
102// NewQueue returns Queue based on dirPath, pageSize is used to limit the data page size,
103func NewQueue(dirPath string, pageSize int64) (Queue, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected