store

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type      string         `json:"type"`
	Data      []byte         `json:"data"`
	Metadata  []byte         `json:"metadata"`
	ID        uuid.UUID      `json:"id"`
	Shard     string         `json:"shard_key"`
	GlobalPos StreamPosition `json:"global_pos"`
}

func (*Event) ReadBytes added in v0.7.14

func (e *Event) ReadBytes(r io.Reader) error

func (Event) WriteBytes added in v0.7.14

func (e Event) WriteBytes(w io.Writer) error

type ReadEvent

type ReadEvent struct {
	Created time.Time `json:"created"`
	Event
	Position StreamPosition `json:"position"`
}

func (*ReadEvent) ReadBytes added in v0.7.14

func (e *ReadEvent) ReadBytes(r io.Reader) error

func (ReadEvent) WriteBytes added in v0.7.14

func (e ReadEvent) WriteBytes(w io.Writer) error

type StreamPosition

type StreamPosition uint64
const (
	STREAM_START StreamPosition = 0
	STREAM_END   StreamPosition = math.MaxUint64
)

type WriteEvent

type WriteEvent struct {
	Status chan<- WriteStatus
	Event
}

type WriteStatus

type WriteStatus struct {
	Time     time.Time
	Error    error
	Position StreamPosition
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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