Documentation
¶
Overview ¶
Package ingest implements event ingestion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
Collector is a receiver of events that handles sending those events to some downstream broker.
type DeduplicatingCollector ¶
type DeduplicatingCollector struct { Collector Deduplicator Deduplicator }
DeduplicatingCollector implements event deduplication at event ingestion.
type Deduplicator ¶
type Deduplicator interface { // IsUnique checks if an event is unique AND adds it to the deduplication index. IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error) }
Deduplicator checks if an event is unique.
type InMemoryCollector ¶
type InMemoryCollector struct {
// contains filtered or unexported fields
}
InMemoryCollector is a {Collector} backed by in-memory storage.
func NewInMemoryCollector ¶
func NewInMemoryCollector() *InMemoryCollector
NewInMemoryCollector returns a new {Collector} backed by in-memory storage.
func (*InMemoryCollector) Close ¶
func (c *InMemoryCollector) Close()
Close implements the {Collector} interface.
func (*InMemoryCollector) Events ¶
func (c *InMemoryCollector) Events(namespace string) []event.Event
Events returns events ingested into a namespace.
func (*InMemoryCollector) Ingest ¶
func (c *InMemoryCollector) Ingest(ev event.Event, namespace string) error
Ingest implements the {Collector} interface.
func (*InMemoryCollector) Namespaces ¶
func (c *InMemoryCollector) Namespaces() []string
Namespaces returns namespaces events were ingested into.
Click to show internal directories.
Click to hide internal directories.