store

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ByNamespaceAndBundleNameIndex = "NamespaceBundleNameIndex"
)

Variables

This section is empty.

Functions

func ByNamespaceAndBundleNameIndexKey

func ByNamespaceAndBundleNameIndexKey(namespace, bundleName string) string

func ByNamespaceAndNameIndexKey

func ByNamespaceAndNameIndexKey(namespace, name string) string

Types

type BundleStore

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

func NewBundle

func NewBundle(bundleInf cache.SharedIndexInformer, store smith.ByNameStore, deepCopy smith.DeepCopy) (*BundleStore, error)

func (*BundleStore) Get

func (s *BundleStore) Get(namespace, bundleName string) (*smith_v1.Bundle, error)

Get returns a bundle by its namespace and name. nil is returned if bundle does not exist.

func (*BundleStore) GetBundlesByCrd

func (s *BundleStore) GetBundlesByCrd(crd *apiext_v1b1.CustomResourceDefinition) ([]*smith_v1.Bundle, error)

GetBundlesByCrd returns Bundles which have a resource defined by CRD.

func (*BundleStore) GetBundlesByObject

func (s *BundleStore) GetBundlesByObject(gk schema.GroupKind, namespace, name string) ([]*smith_v1.Bundle, error)

GetBundlesByObject returns bundles where a resource with specified GVK, namespace and name is defined.

type Crd

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

func NewCrd

func NewCrd(crdInf cache.SharedIndexInformer, deepCopy smith.DeepCopy) (*Crd, error)

func (*Crd) Get

Get returns the CRD that defines the resource of provided group and kind.

type Multi

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

func NewMulti

func NewMulti(deepCopy smith.DeepCopy) *Multi

func (*Multi) AddInformer

func (s *Multi) AddInformer(gvk schema.GroupVersionKind, informer cache.SharedIndexInformer)

AddInformer adds an Informer to the store. Can only be called with a not yet started informer. Otherwise bad things will happen.

func (*Multi) Get

func (s *Multi) Get(gvk schema.GroupVersionKind, namespace, name string) (obj runtime.Object, exists bool, e error)

Get looks up object of specified GVK in the specified namespace by name. A deep copy of the object is returned so it is safe to modify it.

func (*Multi) GetInformers

func (s *Multi) GetInformers() map[schema.GroupVersionKind]cache.SharedIndexInformer

GetInformers gets all registered Informers.

func (*Multi) GetObjectsForBundle

func (s *Multi) GetObjectsForBundle(namespace, bundleName string) ([]runtime.Object, error)

func (*Multi) RemoveInformer

func (s *Multi) RemoveInformer(gvk schema.GroupVersionKind) bool

Jump to

Keyboard shortcuts

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