deploymentstore

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 {
	// ListPendings lists all pending deployments that should be handled by this piped.
	ListPendings() []*model.Deployment
	// ListPlanneds lists all planned deployments that should be handled by this piped.
	ListPlanneds() []*model.Deployment
	// ListRunnings lists all running deployments that should be handled by this piped.
	ListRunnings() []*model.Deployment
	// ListAppHeadDeployments returns the map from application ID to its head of deploying deployments.
	// Application that currently has not any uncompleted deployments will not be in this list.
	// Head deployment is same with the oldest uncompleted one.
	ListAppHeadDeployments() map[string]*model.Deployment
}

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

type Store

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

func NewStore

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

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

Jump to

Keyboard shortcuts

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