store

package
v3.11.0-alpha.0+incomp... Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceReflectors

func NewResourceReflectors(client clientset.Interface, stopCh <-chan struct{}) *resourceStore

func NewResourceStore

func NewResourceStore() *resourceStore

Types

type FakeResourceStore

type FakeResourceStore struct {
	PodsData                   func() []*v1.Pod
	ServicesData               func() []*v1.Service
	NodesData                  func() []*v1.Node
	PersistentVolumesData      func() []*v1.PersistentVolume
	PersistentVolumeClaimsData func() []*v1.PersistentVolumeClaim
}

func (*FakeResourceStore) Add

func (s *FakeResourceStore) Add(resource ccapi.ResourceType, obj interface{}) error

func (*FakeResourceStore) Delete

func (s *FakeResourceStore) Delete(resource ccapi.ResourceType, obj interface{}) error

func (*FakeResourceStore) Get

func (s *FakeResourceStore) Get(resource ccapi.ResourceType, obj interface{}) (item interface{}, exists bool, err error)

func (*FakeResourceStore) GetByKey

func (s *FakeResourceStore) GetByKey(resource ccapi.ResourceType, key string) (item interface{}, exists bool, err error)

func (*FakeResourceStore) List

func (s *FakeResourceStore) List(resource ccapi.ResourceType) []interface{}

func (*FakeResourceStore) RegisterEventHandler

func (s *FakeResourceStore) RegisterEventHandler(resource ccapi.ResourceType, handler cache.ResourceEventHandler) error

func (*FakeResourceStore) Replace

func (s *FakeResourceStore) Replace(resource ccapi.ResourceType, items []interface{}, resourceVersion string) error

func (*FakeResourceStore) Resources

func (s *FakeResourceStore) Resources() []ccapi.ResourceType

func (*FakeResourceStore) Update

func (s *FakeResourceStore) Update(resource ccapi.ResourceType, obj interface{}) error

type ResourceStore

type ResourceStore interface {
	Add(resource ccapi.ResourceType, obj interface{}) error
	Update(resource ccapi.ResourceType, obj interface{}) error
	Delete(resource ccapi.ResourceType, obj interface{}) error
	List(resource ccapi.ResourceType) []interface{}
	Get(resource ccapi.ResourceType, obj interface{}) (item interface{}, exists bool, err error)
	GetByKey(resource ccapi.ResourceType, key string) (item interface{}, exists bool, err error)
	RegisterEventHandler(resource ccapi.ResourceType, handler cache.ResourceEventHandler) error
	// Replace will delete the contents of the store, using instead the
	// given list. Store takes ownership of the list, you should not reference
	// it after calling this function.
	Replace(resource ccapi.ResourceType, items []interface{}, resourceVersion string) error

	Resources() []ccapi.ResourceType
}

Jump to

Keyboard shortcuts

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