eventstore

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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 Store

type Store interface {
	// Run starts syncing the event list with the control-plane.
	Run(ctx context.Context) error
	// GetLatest returns the latest event that meets the given conditions.
	// All objects returned here must be treated as read-only.
	GetLatest(ctx context.Context, name string, labels map[string]string) (*model.Event, bool)
	// UpdateStatuses updates the status of the latest events.
	// The second arg supposed to be the latest event. If it's not the latest, it will be ignored.
	UpdateStatuses(ctx context.Context, latestEvents []model.Event) error
}

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