eventlogv0

package
v0.0.0-...-5ba556e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownEventType = fmt.Errorf("unknown event type")

Functions

This section is empty.

Types

type EventLog

type EventLog struct {
	EventTime   time.Time `json:"-"`
	EventType   EventType `json:"-"`
	RedactCount uint64    `json:"-"`
	Data        []byte    `json:"-"`

	// commit errors are used to indicate
	// the event log was not commited in the storage
	CommitError   string     `json:"commit_error"`
	CommitEndDate *time.Time `json:"end_date"`
}

func Decode

func Decode(data []byte) (*EventLog, error)

func New

func New(eventTime time.Time, eventType EventType, redactCount uint64, data []byte) *EventLog

func (*EventLog) Encode

func (e *EventLog) Encode() ([]byte, error)

func (*EventLog) String

func (e *EventLog) String() string

type EventType

type EventType byte
const (
	InputType  EventType = 'i'
	OutputType EventType = 'o'
	ErrorType  EventType = 'e'
)

Jump to

Keyboard shortcuts

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