Documentation ¶
Overview ¶
Package crd provides the store interface to config resources stored as kubernetes custom resource definitions (CRDs).
Index ¶
- Constants
- func NewStore(u *url.URL, gv *schema.GroupVersion, _ *creds.Options, ck []string) (store.Backend, error)
- func Register(builders map[string]store.Builder)
- func ToBackEndResource(uns *unstructured.Unstructured) *store.BackEndResource
- type Store
- func (s *Store) Get(key store.Key) (*store.BackEndResource, error)
- func (s *Store) Init(kinds []string) error
- func (s *Store) List() map[store.Key]*store.BackEndResource
- func (s *Store) OnAdd(obj interface{})
- func (s *Store) OnDelete(obj interface{})
- func (s *Store) OnUpdate(oldObj, newObj interface{})
- func (s *Store) Stop()
- func (s *Store) WaitForSynced(timeout time.Duration) error
- func (s *Store) Watch() (<-chan store.BackendEvent, error)
Constants ¶
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 ¶
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 ¶
Store offers store.StoreBackend interface through kubernetes custom resource definitions.
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) WaitForSynced ¶
WaitForSynced implements store.WaitForSynced interface