Documentation ¶
Index ¶
- func NewResourceReflectors(client clientset.Interface, stopCh <-chan struct{}) *resourceStore
- func NewResourceStore() *resourceStore
- type FakeResourceStore
- func (s *FakeResourceStore) Add(resource ccapi.ResourceType, obj interface{}) error
- func (s *FakeResourceStore) Delete(resource ccapi.ResourceType, obj interface{}) error
- func (s *FakeResourceStore) Get(resource ccapi.ResourceType, obj interface{}) (item interface{}, exists bool, err error)
- func (s *FakeResourceStore) GetByKey(resource ccapi.ResourceType, key string) (item interface{}, exists bool, err error)
- func (s *FakeResourceStore) List(resource ccapi.ResourceType) []interface{}
- func (s *FakeResourceStore) RegisterEventHandler(resource ccapi.ResourceType, handler cache.ResourceEventHandler) error
- func (s *FakeResourceStore) Replace(resource ccapi.ResourceType, items []interface{}, resourceVersion string) error
- func (s *FakeResourceStore) Resources() []ccapi.ResourceType
- func (s *FakeResourceStore) Update(resource ccapi.ResourceType, obj interface{}) error
- type ResourceStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceReflectors ¶
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 }
Click to show internal directories.
Click to hide internal directories.