control

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package control wraps a pcstore with convenience functions suitable for operational tasks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodCluster

type PodCluster struct {
	ID fields.ID
	// contains filtered or unexported fields
}

func NewPodCluster

func NewPodCluster(
	az fields.AvailabilityZone,
	cn fields.ClusterName,
	podID types.PodID,
	pcstore PodClusterStore,
	selector labels.Selector,
	strategy rc_fields.Strategy,
	minHealthPercentage fields.MinHealthPercentage,
) *PodCluster

func NewPodClusterFromID

func NewPodClusterFromID(
	id fields.ID,
	pcStore PodClusterStore,
) *PodCluster

func (*PodCluster) All

func (pccontrol *PodCluster) All() ([]fields.PodCluster, error)

func (*PodCluster) Create

func (pccontrol *PodCluster) Create(annotations fields.Annotations, session pcstore.Session) (fields.PodCluster, error)

func (*PodCluster) Delete

func (pccontrol *PodCluster) Delete() (errors []error)

Best effort delete of the list of podClusterID will not halt on error

func (*PodCluster) Get

func (pccontrol *PodCluster) Get() (fields.PodCluster, error)

func (*PodCluster) UpdateAnnotations

func (pccontrol *PodCluster) UpdateAnnotations(annotations fields.Annotations) (fields.PodCluster, error)

UpdateAnnotations replaces the annotations on the pod cluster configured for the pod cluster control structure

type PodClusterStore

type PodClusterStore interface {
	Get(id fields.ID) (fields.PodCluster, error)
	FindWhereLabeled(
		podID types.PodID,
		availabilityZone fields.AvailabilityZone,
		clusterName fields.ClusterName,
	) ([]fields.PodCluster, error)
	Delete(id fields.ID) error
	Create(
		podID types.PodID,
		availabilityZone fields.AvailabilityZone,
		clusterName fields.ClusterName,
		podSelector labels.Selector,
		annotations fields.Annotations,
		allocationStrategy rc_fields.Strategy,
		minHealthPercentage fields.MinHealthPercentage,
		session pcstore.Session,
	) (fields.PodCluster, error)
	MutatePC(
		id fields.ID,
		mutator func(fields.PodCluster) (fields.PodCluster, error),
	) (fields.PodCluster, error)
}

Jump to

Keyboard shortcuts

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