applicationstore

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lister

type Lister interface {
	// List lists all applications that should be handled by this piped.
	// All disabled applications will be ignored.
	List() []*model.Application
	// ListByCloudProvider lists all applications for a given cloud provider name.
	ListByCloudProvider(name string) []*model.Application
	// Get retrieves a specifiec deployment for the given id.
	Get(id string) (*model.Application, bool)
}

Lister helps list and get application. All objects returned here must be treated as read-only.

type Store

type Store interface {
	// Run starts syncing the application list with the control-plane.
	Run(ctx context.Context) error
	// Lister returns a lister for retrieving applications.
	Lister() Lister
}

func NewStore

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

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

Jump to

Keyboard shortcuts

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