pcstoretest

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePCStore

type FakePCStore struct {
	// contains filtered or unexported fields
}

Implementation of the pcstore.Store interface that can be used for unit testing

func NewFake

func NewFake() *FakePCStore

func (*FakePCStore) Create

func (p *FakePCStore) Create(
	podID types.PodID,
	availabilityZone fields.AvailabilityZone,
	clusterName fields.ClusterName,
	podSelector klabels.Selector,
	annotations fields.Annotations,
	strategy rc_fields.Strategy,
	minHealthPercentage fields.MinHealthPercentage,
	_ pcstore.Session,
) (fields.PodCluster, error)

func (*FakePCStore) Delete

func (p *FakePCStore) Delete(id fields.ID) error

func (*FakePCStore) FindWhereLabeled

func (p *FakePCStore) FindWhereLabeled(
	podID types.PodID,
	availabilityZone fields.AvailabilityZone,
	clusterName fields.ClusterName,
) ([]fields.PodCluster, error)

func (*FakePCStore) Get

func (p *FakePCStore) Get(id fields.ID) (fields.PodCluster, error)

func (*FakePCStore) List

func (p *FakePCStore) List() ([]fields.PodCluster, error)

func (*FakePCStore) LockForSync

func (p *FakePCStore) LockForSync(id fields.ID, syncerType pcstore.ConcreteSyncerType, session pcstore.Session) (consul.Unlocker, error)

func (*FakePCStore) MutatePC

func (p *FakePCStore) MutatePC(
	id fields.ID,
	mutator func(fields.PodCluster) (fields.PodCluster, error),
) (fields.PodCluster, error)

func (*FakePCStore) SetMetricsRegistry

func (p *FakePCStore) SetMetricsRegistry(_ pcstore.MetricsRegistry)

func (*FakePCStore) Watch

func (p *FakePCStore) Watch(quit <-chan struct{}) <-chan pcstore.WatchedPodClusters

func (*FakePCStore) WatchAndSync

func (p *FakePCStore) WatchAndSync(concrete pcstore.ConcreteSyncer, quit <-chan struct{}) error

func (*FakePCStore) WatchPodCluster

func (p *FakePCStore) WatchPodCluster(id fields.ID, quit <-chan struct{}) <-chan pcstore.WatchedPodCluster

Jump to

Keyboard shortcuts

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