Documentation
¶
Overview ¶
Package ebl reads bounded Enhanced Binary Log capture streams.
Index ¶
- Constants
- Variables
- type Direction
- type Event
- type Reader
- type Warning
- type Writer
- func (w *Writer) Err() error
- func (w *Writer) Metrics() WriterMetrics
- func (w *Writer) WriteDescription(description string) error
- func (w *Writer) WriteRawBST(timestamp time.Time, direction Direction, raw []byte) error
- func (w *Writer) WriteRawBytes(timestamp time.Time, direction Direction, data []byte) error
- type WriterConfig
- type WriterMetrics
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 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.
type Writer ¶ added in v1.2.0
type Writer struct {
// contains filtered or unexported fields
}
Writer serializes Enhanced Binary Log records. Each public write is one atomic event group so timestamps and direction markers cannot interleave.
func NewWriter ¶ added in v1.2.0
func NewWriter(output io.Writer, config WriterConfig) (*Writer, error)
func (*Writer) Metrics ¶ added in v1.2.0
func (w *Writer) Metrics() WriterMetrics
func (*Writer) WriteDescription ¶ added in v1.2.0
func (*Writer) WriteRawBST ¶ added in v1.2.0
type WriterConfig ¶ added in v1.2.0
type WriterMetrics ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.