Documentation
¶
Overview ¶
Package catalog handles interacting with the OSB catalog endpoint (i.e. informers/helpers for ClusterServiceClass and ClusterServicePlan)
Index ¶
- Constants
- func ByNamespaceAndControllerUIDIndexKey(namespace string, uid types.UID) string
- func ByNamespaceAndNameIndexKey(namespace, name string) string
- type BundleStore
- func (s *BundleStore) Get(namespace, bundleName string) (*smith_v1.Bundle, error)
- func (s *BundleStore) GetBundlesByCrd(crd *apiext_v1b1.CustomResourceDefinition) ([]*smith_v1.Bundle, error)
- func (s *BundleStore) GetBundlesByObject(gk schema.GroupKind, namespace, name string) ([]*smith_v1.Bundle, error)
- type ByNameStore
- type Catalog
- func (c *Catalog) GetClassOf(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (*sc_v1b1.ClusterServiceClass, error)
- func (c *Catalog) GetPlanOf(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (*sc_v1b1.ClusterServicePlan, error)
- func (c *Catalog) ValidateServiceInstanceSpec(serviceInstanceSpec *sc_v1b1.ServiceInstanceSpec) (ValidationResult, error)
- type Crd
- type Multi
- type MultiBasic
- func (s *MultiBasic) AddInformer(gvk schema.GroupVersionKind, informer cache.SharedIndexInformer) error
- func (s *MultiBasic) Get(gvk schema.GroupVersionKind, namespace, name string) (obj runtime.Object, exists bool, e error)
- func (s *MultiBasic) GetInformers() map[schema.GroupVersionKind]cache.SharedIndexInformer
- func (s *MultiBasic) RemoveInformer(gvk schema.GroupVersionKind) bool
- type ValidationResult
Constants ¶
const (
ByNamespaceAndControllerUIDIndex = "NamespaceUidIndex"
)
Variables ¶
This section is empty.
Functions ¶
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 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 (*Crd) Get ¶
func (s *Crd) Get(resource schema.GroupKind) (*apiext_v1b1.CustomResourceDefinition, error)
Get returns the CRD that defines the resource of provided group and kind.
type Multi ¶
type Multi struct {
MultiBasic
}
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.
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 ¶
func (s *MultiBasic) GetInformers() map[schema.GroupVersionKind]cache.SharedIndexInformer
GetInformers gets all registered Informers.
func (*MultiBasic) RemoveInformer ¶
func (s *MultiBasic) RemoveInformer(gvk schema.GroupVersionKind) bool
type ValidationResult ¶
type ValidationResult struct {
Errors []error
}