eventstore

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	// GetLatest returns the latest event that meets the given conditions.
	GetLatest(ctx context.Context, name string, labels map[string]string) (*model.Event, bool)
}

Getter helps get an event. All objects returned here must be treated as read-only.

type Store

type Store interface {
	// Run starts syncing the event list with the control-plane.
	Run(ctx context.Context) error
	// Getter returns a getter for retrieving an event.
	Getter() Getter
}

func NewStore

func NewStore(apiClient apiClient, gracePeriod time.Duration, logger *zap.Logger) Store

NewStore creates a new event store instance. This syncs with the control plane to keep the list of events for this runner up-to-date.

Jump to

Keyboard shortcuts

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