Documentation
¶
Index ¶
- Constants
- func Decode[T any](data []byte) (*T, error)
- func Encode[T any](value T) ([]byte, error)
- func ValidateChunk(chunk ChunkEntry) error
- func ValidateCompact(meta *CompactMetadata, day string) error
- func ValidateManifest(m *Manifest, day, writer string) error
- type ChunkEntry
- type Codec
- type CompactMetadata
- type CompactSource
- type CompressionError
- type Event
- type LogEntry
- type Manifest
- type ObjectRange
- type Range
- type Sequence
Constants ¶
View Source
const (
MaxMillis = 86_399_999
)
Variables ¶
This section is empty.
Functions ¶
func ValidateChunk ¶ added in v0.2.0
func ValidateChunk(chunk ChunkEntry) error
func ValidateCompact ¶ added in v0.2.0
func ValidateCompact(meta *CompactMetadata, day string) error
func ValidateManifest ¶ added in v0.2.0
Types ¶
type ChunkEntry ¶
type ChunkEntry struct {
Sequence Sequence `json:"sequence"`
Entries uint32 `json:"entries"`
Time [2]uint32 `json:"time"`
BitmapSize int64 `json:"bitmapSize"`
Data Range `json:"data"`
Size int64 `json:"size"`
ETag string `json:"etag"`
Actors map[uint32]Range `json:"actors,omitempty"`
}
ChunkEntry describes one immutable writer chunk.
func (ChunkEntry) Between ¶
func (c ChunkEntry) Between(from, to uint32) bool
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec handles ZSTD compression and decompression operations.
type CompactMetadata ¶ added in v0.2.0
type CompactMetadata struct {
Day string `json:"day"`
PublishedAt int64 `json:"publishedAt"`
Index ObjectRange `json:"index"`
Actors map[uint32]Range `json:"actors"`
Sources []CompactSource `json:"sources"`
}
type CompactSource ¶ added in v0.2.0
type CompressionError ¶
CompressionError represents a compression/decompression error.
func (*CompressionError) Error ¶
func (e *CompressionError) Error() string
func (*CompressionError) Unwrap ¶
func (e *CompressionError) Unwrap() error
type Event ¶ added in v0.2.0
type Event struct {
// contains filtered or unexported fields
}
Event is a zero-copy view over a validated event frame. Returned slices are read-only by contract; Clone creates independent storage.
func (Event) JSON ¶ added in v0.2.0
func (e Event) JSON() json.RawMessage
type LogEntry ¶
type LogEntry []byte
LogEntry is one validated on-disk event frame.
func ValidateEntries ¶ added in v0.2.0
ValidateEntries validates an entire decompressed chunk once at its boundary.
func ValidateEntry ¶ added in v0.2.0
ValidateEntry validates the first frame in data and returns its exact view.
type Manifest ¶ added in v0.2.0
type Manifest struct {
Day string `json:"day"`
Writer string `json:"writer"`
Chunks []ChunkEntry `json:"chunks"`
}
Manifest is the append-only index owned by one writer for one UTC day.
func (*Manifest) NextSequence ¶ added in v0.2.0
type ObjectRange ¶ added in v0.2.0
type Sequence ¶ added in v0.2.0
type Sequence uint64
Sequence is a writer-local chunk sequence encoded as 20 decimal digits.
func (Sequence) MarshalJSON ¶ added in v0.2.0
func (*Sequence) UnmarshalJSON ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.