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 ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID string Timestamp time.Time AppliesAt time.Time Payload proto.Message Sender Sender }
The Event type describes something that has happened at a particular point in time. It contains information on who sent it and when. Each event payload is a proto-encoded message.
type MultiReader ¶
type MultiReader struct {
// contains filtered or unexported fields
}
The MultiReader type is used to handle inbound events from multiple topics across different event stream providers.
func NewMultiReader ¶
func NewMultiReader(ctx context.Context, urls []string) (*MultiReader, error)
NewMultiReader creates a new instance of the MultiReader type that will read events from the configured event stream providers identified using the given URLs.
func (*MultiReader) Close ¶
func (mr *MultiReader) Close() error
Close all event stream connections.
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.