events

package
v0.0.0-...-8b91daf Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSinkTooSmall = errors.New("sink to small")

Functions

func ProcessOldSinks

func ProcessOldSinks(logger telemetry.Logger, s storage.System, index Index) error

Types

type Estimator

type Estimator interface {
	OnWriteData(bytesWritten int64)
	ShouldTryFlush() bool
	OnFlush(compressedSize int64, success bool)
}

type Event

type Event struct {
	Timestamp time.Time
	Key       string
	Data      []byte
	Delete    bool
}

func GetEvents

func GetEvents(s storage.System, eventFile string) ([]Event, error)

func (Event) Apply

func (e Event) Apply(ret map[string][]byte)

type Index

type Index interface {
	GetStateAt(timestamp time.Time) (map[string][]byte, error)
	UpdateIndex(header chunks.Header) error
}

type Meta

type Meta interface {
	GetEventFiles() ([]string, error)
}

func NewMeta

func NewMeta(storage storage.System) (Meta, error)

type Sink

type Sink interface {
	Append(event Event) (bool, error)
}

func NewSink

func NewSink(s storage.System, i Index, chunkTargetSize int64, maxChunkAge time.Duration, logger telemetry.Logger, metrics telemetry.Metrics) Sink

Jump to

Keyboard shortcuts

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