Documentation ¶
Index ¶
- Variables
- func AddToRegistry(api string, singular, plural runtime.Object, keyer KeyerFunc, ...)
- func NewFakeCustomInformer(handlers cache.ResourceEventHandlerFuncs, keyer KeyerFunc, ...) (cache.Store, chan struct{})
- func NewKubeconfig(configPath string, gv *schema.GroupVersion, ...) (*rest.Config, error)
- func NewKubeconfigFromSecret(secret *v1.Secret, gv *schema.GroupVersion) (*rest.Config, error)
- func WatchRealResources(clientSet NamespacedCRDClientInterface, resource, namespace string, ...) (cache.Store, chan struct{}, error)
- func WatchResources(clientSet NamespacedCRDClientInterface, resource, namespace string, ...) (cache.Store, chan struct{}, error)
- func WatchfakeResources(resource string, handlers cache.ResourceEventHandlerFuncs) (cache.Store, chan struct{}, error)
- type CRDClient
- type Client
- func (c *Client) Create(obj runtime.Object, opts metav1.CreateOptions) (runtime.Object, error)
- func (c *Client) Delete(name string, opts metav1.DeleteOptions) error
- func (c *Client) Get(name string, opts metav1.GetOptions) (runtime.Object, error)
- func (c *Client) List(opts metav1.ListOptions) (runtime.Object, error)
- func (c *Client) Namespace(namespace string) CrdClientInterface
- func (c *Client) Update(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error)
- func (c *Client) UpdateStatus(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error)
- func (c *Client) Watch(opts metav1.ListOptions) (watch.Interface, error)
- type CrdClientInterface
- type FakeClient
- func (c *FakeClient) Create(obj runtime.Object, _ metav1.CreateOptions) (runtime.Object, error)
- func (c *FakeClient) Delete(name string, opts metav1.DeleteOptions) error
- func (c *FakeClient) Get(name string, _ metav1.GetOptions) (runtime.Object, error)
- func (c *FakeClient) List(_ metav1.ListOptions) (runtime.Object, error)
- func (c *FakeClient) Namespace(namespace string) CrdClientInterface
- func (c *FakeClient) Update(name string, obj runtime.Object, _ metav1.UpdateOptions) (runtime.Object, error)
- func (c *FakeClient) UpdateStatus(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error)
- func (c *FakeClient) Watch(_ metav1.ListOptions) (watch.Interface, error)
- type KeyerFunc
- type NamespacedCRDClientInterface
- type RegistryType
Constants ¶
This section is empty.
Variables ¶
View Source
var Fake bool
View Source
var Registry = make(map[string]RegistryType)
Functions ¶
func AddToRegistry ¶
func NewFakeCustomInformer ¶
func NewFakeCustomInformer(handlers cache.ResourceEventHandlerFuncs, keyer KeyerFunc, groupResource schema.GroupResource) (cache.Store, chan struct{})
NewFakeCustomInformer creates a new FakeCustomInformer, registers the callbacks and start the watching routine that implements the caching functionality and the callbak notifications
func NewKubeconfig ¶
func NewKubeconfigFromSecret ¶
func WatchRealResources ¶
func WatchRealResources(clientSet NamespacedCRDClientInterface, resource, namespace string, resyncPeriod time.Duration, handlers cache.ResourceEventHandlerFuncs, lo metav1.ListOptions) (cache.Store, chan struct{}, error)
Watch RealResources creates
func WatchResources ¶
func WatchResources(clientSet NamespacedCRDClientInterface, resource, namespace string, resyncPeriod time.Duration, handlers cache.ResourceEventHandlerFuncs, lo metav1.ListOptions) (cache.Store, chan struct{}, error)
WatchResources is a wrapper cache function that allows to create either a real cache or a fake one, depending on the global variable Fake
func WatchfakeResources ¶
func WatchfakeResources(resource string, handlers cache.ResourceEventHandlerFuncs) (cache.Store, chan struct{}, error)
WatchfakeResources creates a Fake custom informer, useful for testing purposes TODO: to implement all the caching functionality, such as resync, filtering, etc.
Types ¶
type CRDClient ¶
type CRDClient struct { Store cache.Store Stop chan struct{} // contains filtered or unexported fields }
func (*CRDClient) Client ¶
func (c *CRDClient) Client() kubernetes.Interface
func (*CRDClient) Resource ¶
func (c *CRDClient) Resource(api string) CrdClientInterface
type Client ¶
func (*Client) Namespace ¶
func (c *Client) Namespace(namespace string) CrdClientInterface
func (*Client) UpdateStatus ¶
type CrdClientInterface ¶
type CrdClientInterface interface { Namespace(namespace string) CrdClientInterface List(opts metav1.ListOptions) (runtime.Object, error) Get(name string, opts metav1.GetOptions) (runtime.Object, error) Create(obj runtime.Object, opts metav1.CreateOptions) (runtime.Object, error) Watch(opts metav1.ListOptions) (watch.Interface, error) Update(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error) UpdateStatus(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error) Delete(name string, opts metav1.DeleteOptions) error }
type FakeClient ¶
func (*FakeClient) Create ¶
func (c *FakeClient) Create(obj runtime.Object, _ metav1.CreateOptions) (runtime.Object, error)
func (*FakeClient) Delete ¶
func (c *FakeClient) Delete(name string, opts metav1.DeleteOptions) error
func (*FakeClient) Get ¶
func (c *FakeClient) Get(name string, _ metav1.GetOptions) (runtime.Object, error)
func (*FakeClient) List ¶
func (c *FakeClient) List(_ metav1.ListOptions) (runtime.Object, error)
func (*FakeClient) Namespace ¶
func (c *FakeClient) Namespace(namespace string) CrdClientInterface
func (*FakeClient) Update ¶
func (c *FakeClient) Update(name string, obj runtime.Object, _ metav1.UpdateOptions) (runtime.Object, error)
func (*FakeClient) UpdateStatus ¶
func (c *FakeClient) UpdateStatus(name string, obj runtime.Object, opts metav1.UpdateOptions) (runtime.Object, error)
func (*FakeClient) Watch ¶
func (c *FakeClient) Watch(_ metav1.ListOptions) (watch.Interface, error)
type NamespacedCRDClientInterface ¶
type NamespacedCRDClientInterface interface {
Resource(resource string) CrdClientInterface
}
type RegistryType ¶
Click to show internal directories.
Click to hide internal directories.