ebl

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ebl reads bounded Enhanced Binary Log capture streams.

Index

Constants

View Source
const (
	TagVersion         = 0x01
	TagDescription     = 0x02
	TagTimeUTC         = 0x03
	TagElementType     = 0x04
	TagDirectionMarker = 0x05
	TagBSTRawFrame     = 0x07

	CurrentVersion = 1002
	MaxTagPayload  = 1800
)

Variables

View Source
var ErrUnsupportedVersion = errors.New("EBL version is newer than supported")

Functions

This section is empty.

Types

type Direction

type Direction uint8
const (
	DirectionUnknown Direction = iota
	DirectionReceived
	DirectionTransmitted
)

type Event

type Event struct {
	Timestamp    time.Time
	HasTimestamp bool
	Direction    Direction
	RawBST       bool
	Payload      []byte
}

Event is an owned raw-stream chunk or one unframed BST record.

type Reader

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

Reader incrementally parses one EBL file. Retained tag and raw-stream state is bounded by MaxTagPayload and maxRawChunk.

func NewReader

func NewReader() *Reader

func (*Reader) Read

func (r *Reader) Read(input io.Reader, emit func(Event), report func(Warning)) error

Read consumes r to EOF. Recoverable corruption is reported and parsing continues; a newer declared EBL version is terminal.

type Warning

type Warning struct {
	Offset int64
	Err    error
}

func (Warning) Error

func (w Warning) Error() string

func (Warning) Unwrap

func (w Warning) Unwrap() error

Jump to

Keyboard shortcuts

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