Documentation ¶
Overview ¶
Package event contains utilities for interacting with various event-stream providers. Including the ability to write and read from event-streaming sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Ignore = errors.New("ignore")
Ignore is a sentinel error used to indicate that a read event has been a noop, this allows us to cancel traces and increment certain metrics. nolint: revive,stylecheck
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID string Key string Timestamp time.Time AppliesAt time.Time Payload proto.Message }
The Event type describes something that has happened at a particular point in time.
type Option ¶
type Option func(e *Event)
The Option type is a function that can modify an event value.
func WithAppliesAt ¶
WithAppliesAt returns an Option that can be provided to New to set the Event.AppliesAt field.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
The Reader type is used to handle inbound events from a single topic.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
The Writer type is used to write events to a single topic.