crd

package
v0.0.0-...-5c99f88 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package crd provides the store interface to config resources stored as kubernetes custom resource definitions (CRDs).

Index

Constants

View Source
const (

	// ConfigAPIGroup is the API group for the config CRDs.
	ConfigAPIGroup = "config.istio.io"
	// ConfigAPIVersion is the API version for the config CRDs.
	ConfigAPIVersion = "v1alpha2"
)

Variables

This section is empty.

Functions

func NewStore

func NewStore(u *url.URL, gv *schema.GroupVersion, _ *creds.Options, ck []string) (store.Backend, error)

NewStore creates a new Store instance.

func Register

func Register(builders map[string]store.Builder)

Register registers this module as a StoreBackend. Do not use 'init()' for automatic registration; linker will drop the whole module because it looks unused.

func ToBackEndResource

func ToBackEndResource(uns *unstructured.Unstructured) *store.BackEndResource

ToBackEndResource converts an unstructured k8s resource into a mixer backend resource.

Types

type Store

type Store struct {
	*probe.Probe
	// contains filtered or unexported fields
}

Store offers store.StoreBackend interface through kubernetes custom resource definitions.

func (*Store) Get

func (s *Store) Get(key store.Key) (*store.BackEndResource, error)

Get implements store.Backend interface.

func (*Store) Init

func (s *Store) Init(kinds []string) error

Init implements store.StoreBackend interface.

func (*Store) List

func (s *Store) List() map[store.Key]*store.BackEndResource

List implements store.Backend interface.

func (*Store) OnAdd

func (s *Store) OnAdd(obj interface{})

OnAdd implements cache.ResourceEventHandler interface.

func (*Store) OnDelete

func (s *Store) OnDelete(obj interface{})

OnDelete implements cache.ResourceEventHandler interface.

func (*Store) OnUpdate

func (s *Store) OnUpdate(oldObj, newObj interface{})

OnUpdate implements cache.ResourceEventHandler interface.

func (*Store) Stop

func (s *Store) Stop()

Stop implements store.Backend interface.

func (*Store) WaitForSynced

func (s *Store) WaitForSynced(timeout time.Duration) error

WaitForSynced implements store.WaitForSynced interface

func (*Store) Watch

func (s *Store) Watch() (<-chan store.BackendEvent, error)

Watch implements store.Backend interface.

Jump to

Keyboard shortcuts

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