Documentation ¶
Index ¶
- func CreateOrUpdateFromHandler(ctx context.Context, namespace, input string, ...) ([]string, error)
- type DynamicCache
- func (d *DynamicCache) CheckResourceAccess(ctx context.Context, gvr schema.GroupVersionResource) bool
- func (d *DynamicCache) Create(ctx context.Context, object *unstructured.Unstructured) error
- func (d *DynamicCache) CreateOrUpdateFromYAML(ctx context.Context, namespace, input string) ([]string, error)
- func (d *DynamicCache) Delete(ctx context.Context, key store.Key) error
- func (d *DynamicCache) Get(ctx context.Context, key store.Key) (object *unstructured.Unstructured, err error)
- func (d *DynamicCache) IsLoading(ctx context.Context, key store.Key) bool
- func (d *DynamicCache) List(ctx context.Context, key store.Key) (list *unstructured.UnstructuredList, loading bool, err error)
- func (d *DynamicCache) Unwatch(ctx context.Context, groupVersionKinds ...schema.GroupVersionKind) error
- func (d *DynamicCache) Update(ctx context.Context, key store.Key, ...) error
- func (d *DynamicCache) UpdateClusterClient(ctx context.Context, client cluster.ClientInterface) error
- func (d *DynamicCache) WaitForCacheSync(ctx context.Context) bool
- func (d *DynamicCache) Watch(ctx context.Context, key store.Key, handler cache.ResourceEventHandler) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateFromHandler ¶ added in v0.15.0
func CreateOrUpdateFromHandler( ctx context.Context, namespace, input string, get func(context.Context, store.Key) (*unstructured.Unstructured, error), create func(context.Context, *unstructured.Unstructured) error, clusterClient cluster.ClientInterface, ) ([]string, error)
Types ¶
type DynamicCache ¶
type DynamicCache struct {
// contains filtered or unexported fields
}
func NewDynamicCache ¶
func NewDynamicCache(ctx context.Context, client cluster.ClientInterface, opts ...Option) (*DynamicCache, error)
func (*DynamicCache) CheckResourceAccess ¶ added in v0.25.0
func (d *DynamicCache) CheckResourceAccess(ctx context.Context, gvr schema.GroupVersionResource) bool
func (*DynamicCache) Create ¶ added in v0.12.0
func (d *DynamicCache) Create(ctx context.Context, object *unstructured.Unstructured) error
func (*DynamicCache) CreateOrUpdateFromYAML ¶ added in v0.15.0
func (d *DynamicCache) CreateOrUpdateFromYAML(ctx context.Context, namespace, input string) ([]string, error)
CreateOrUpdateFromYAML creates resources in the cluster from YAML input. Resources are created in the order they are present in the YAML. An error creating a resource halts resource creation. A list of created resources is returned. You may have created resources AND a non-nil error.
func (*DynamicCache) Get ¶
func (d *DynamicCache) Get(ctx context.Context, key store.Key) (object *unstructured.Unstructured, err error)
func (*DynamicCache) List ¶
func (d *DynamicCache) List(ctx context.Context, key store.Key) (list *unstructured.UnstructuredList, loading bool, err error)
func (*DynamicCache) Unwatch ¶
func (d *DynamicCache) Unwatch(ctx context.Context, groupVersionKinds ...schema.GroupVersionKind) error
func (*DynamicCache) Update ¶
func (d *DynamicCache) Update(ctx context.Context, key store.Key, updater func(*unstructured.Unstructured) error) error
func (*DynamicCache) UpdateClusterClient ¶
func (d *DynamicCache) UpdateClusterClient(ctx context.Context, client cluster.ClientInterface) error
func (*DynamicCache) WaitForCacheSync ¶ added in v0.18.0
func (d *DynamicCache) WaitForCacheSync(ctx context.Context) bool
func (*DynamicCache) Watch ¶
func (d *DynamicCache) Watch(ctx context.Context, key store.Key, handler cache.ResourceEventHandler) error
type Option ¶ added in v0.18.0
type Option func(*DynamicCache)
func WithDynamicSharedInformerFactory ¶ added in v0.18.0
func WithDynamicSharedInformerFactory(factory dynamicinformer.DynamicSharedInformerFactory) Option
Click to show internal directories.
Click to hide internal directories.