eqldbqueue

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package eqldbqueue provides small durable FIFO queues for EQLDB uploads. Queue cursors are byte offsets; acknowledged history is never rescanned.

Index

Constants

View Source
const (
	PlaneOfSky = "plane-of-sky"
	Kills      = "kills"
	Drops      = "drops"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID      string          `json:"id"`
	Payload json.RawMessage `json:"payload"`

	EndOffset int64 `json:"-"`
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func Default

func Default() (*Queue, error)

func Open

func Open(directory string) (*Queue, error)

func (*Queue) Acknowledge

func (q *Queue) Acknowledge(name string, endOffset int64) error

func (*Queue) Append

func (q *Queue) Append(name, id string, payload any) error

func (*Queue) Batch

func (q *Queue) Batch(name string, maximum int) ([]Entry, error)

func (*Queue) DiscardBefore

func (q *Queue) DiscardBefore(cutoff time.Time) error

DiscardBefore removes pending launch-data entries older than cutoff and compacts the queues so their byte cursors restart at zero.

func (*Queue) Path

func (q *Queue) Path(name string) string

func (*Queue) RecentIDs

func (q *Queue) RecentIDs(name string, tailBytes int64) (map[string]struct{}, error)

RecentIDs returns IDs from the tail of a queue. Producers use this bounded window to avoid re-enqueueing lines after a crash between queue append and logfile-checkpoint persistence.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL