store

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Overview

Package catalog handles interacting with the OSB catalog endpoint (i.e. informers/helpers for ClusterServiceClass and ClusterServicePlan)

Index

Constants

View Source
const (
	ByNamespaceAndControllerUIDIndex = "NamespaceUidIndex"
)

Variables

This section is empty.

Functions

func ByNamespaceAndControllerUIDIndexKey

func ByNamespaceAndControllerUIDIndexKey(namespace string, uid types.UID) 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 ByNameStore, pluginContainers map[smith_v1.PluginName]plugin.Container) (*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 ByNameStore

type ByNameStore interface {
	Get(gvk schema.GroupVersionKind, namespace, name string) (obj runtime.Object, exists bool, err error)
}

type Catalog

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

Catalog is a convenience interface to access OSB catalog information

func NewCatalog

func NewCatalog(serviceClassInf cache.SharedIndexInformer, servicePlanInf cache.SharedIndexInformer) (*Catalog, error)

func (*Catalog) GetClassOf

func (c *Catalog) GetClassOf(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (*sc_v1b1.ClusterServiceClass, error)

func (*Catalog) GetPlanOf

func (c *Catalog) GetPlanOf(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (*sc_v1b1.ClusterServicePlan, error)

func (*Catalog) ValidateServiceInstanceSpec

func (c *Catalog) ValidateServiceInstanceSpec(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (ValidationResult, error)

type Crd

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

func NewCrd

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

func (*Crd) Get

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

type Multi

type Multi struct {
	MultiBasic
}

func NewMulti

func NewMulti() *Multi

func (*Multi) AddInformer

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

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

func (*Multi) ObjectsControlledBy

func (s *Multi) ObjectsControlledBy(namespace string, uid types.UID) ([]runtime.Object, error)

type MultiBasic

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

func NewMultiBasic

func NewMultiBasic() *MultiBasic

func (*MultiBasic) AddInformer

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

AddInformer adds an Informer to the store.

func (*MultiBasic) Get

func (s *MultiBasic) 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 (*MultiBasic) GetInformers

GetInformers gets all registered Informers.

func (*MultiBasic) RemoveInformer

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

type ValidationResult

type ValidationResult struct {
	Errors []error
}

Jump to

Keyboard shortcuts

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