Documentation ¶
Index ¶
- Constants
- type FixupFunc
- type REST
- func (r *REST) Categories() []string
- func (r *REST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)
- func (r *REST) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, ...) (runtime.Object, bool, error)
- func (r *REST) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, ...) (runtime.Object, error)
- func (r *REST) Destroy()
- func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (r *REST) GetSingularName() string
- func (r *REST) GroupVersion() schema.GroupVersion
- func (r *REST) GroupVersionKind(_ schema.GroupVersion) schema.GroupVersionKind
- func (r *REST) List(ctx context.Context, options *internalversion.ListOptions) (runtime.Object, error)
- func (r *REST) NamespaceScoped() bool
- func (r *REST) New() runtime.Object
- func (r *REST) NewList() runtime.Object
- func (r *REST) SetCRD(crd *apiextensionsv1.CustomResourceDefinition)
- func (r *REST) SetGroup(group string)
- func (r *REST) SetKind(kind string)
- func (r *REST) SetName(name string)
- func (r *REST) SetNamespaceScoped(namespaceScoped bool)
- func (r *REST) SetShortNames(ss []string)
- func (r *REST) SetSingularName(name string)
- func (r *REST) SetVersion(version string)
- func (r *REST) ShortNames() []string
- func (r *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions) (watch.Interface, error)
- type ScaleREST
- func (r *ScaleREST) Destroy()
- func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind
- func (r *ScaleREST) New() runtime.Object
- func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- type WatchWrapper
Constants ¶
const ( CoreGroupPrefix = "api" NamedGroupPrefix = "apis" // DefaultDeleteCollectionWorkers defines the default value for deleteCollectionWorkers DefaultDeleteCollectionWorkers = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type REST ¶
type REST struct { // is this Rest for CRD resource. CRD *apiextensionsv1.CustomResourceDefinition // contains filtered or unexported fields }
REST implements a RESTStorage for Shadow API
func NewREST ¶
func NewREST(dryRunClient clientgorest.Interface, clusternetclient *clusternet.Clientset, parameterCodec runtime.ParameterCodec, manifestLister applisters.ManifestLister, reservedNamespace string) *REST
NewREST returns a RESTStorage object that will work against API services.
func (*REST) Categories ¶
func (*REST) ConvertToTable ¶
func (*REST) Create ¶
func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)
Create inserts a new item into Manifest according to the unique key from the object.
func (*REST) Delete ¶
func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)
Delete removes the item from storage. options can be mutated by rest.BeforeDelete due to a graceful deletion strategy.
func (*REST) DeleteCollection ¶
func (r *REST) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *internalversion.ListOptions) (runtime.Object, error)
DeleteCollection removes all items returned by List with a given ListOptions from storage.
DeleteCollection is currently NOT atomic. It can happen that only subset of objects will be deleted from storage, and then an error will be returned. In case of success, the list of deleted objects will be returned. Copied from k8s.io/apiserver/pkg/registry/generic/registry/store.go and modified.
func (*REST) Get ¶
func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
Get retrieves the item from Manifest.
func (*REST) GetSingularName ¶ added in v0.17.0
func (*REST) GroupVersion ¶
func (r *REST) GroupVersion() schema.GroupVersion
func (*REST) GroupVersionKind ¶
func (r *REST) GroupVersionKind(_ schema.GroupVersion) schema.GroupVersionKind
func (*REST) List ¶
func (r *REST) List(ctx context.Context, options *internalversion.ListOptions) (runtime.Object, error)
List returns a list of items matching labels.
func (*REST) NamespaceScoped ¶
func (*REST) SetCRD ¶
func (r *REST) SetCRD(crd *apiextensionsv1.CustomResourceDefinition)
func (*REST) SetNamespaceScoped ¶
func (*REST) SetShortNames ¶
func (*REST) SetSingularName ¶ added in v0.17.0
func (*REST) SetVersion ¶
func (*REST) ShortNames ¶
func (*REST) Update ¶
func (r *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)
Update performs an atomic update and set of the object. Returns the result of the update or an error. If the registry allows create-on-update, the create flow will be executed. A bool is returned along with the object and any errors, to indicate object creation.
func (*REST) Watch ¶
func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions) (watch.Interface, error)
Watch makes a matcher for the given label and field.
type ScaleREST ¶
type ScaleREST struct {
// contains filtered or unexported fields
}
ScaleREST implements a ScaleREST Storage for Shadow API
func NewScaleREST ¶
NewScaleREST returns a ScaleREST Storage object that will work against API services.
func (*ScaleREST) Get ¶
func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
Get retrieves object from ScaleREST storage.
func (*ScaleREST) GroupVersionKind ¶
func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind
GroupVersionKind returns GroupVersionKind for Scale object
func (*ScaleREST) Update ¶
func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)
Update alters scale subset of object.
type WatchWrapper ¶
func NewWatchWrapper ¶
func NewWatchWrapper(ctx context.Context, watcher watch.Interface, fixup FixupFunc, targetGVK schema.GroupVersionKind, size int) *WatchWrapper
func (*WatchWrapper) ResultChan ¶
func (w *WatchWrapper) ResultChan() <-chan watch.Event
func (*WatchWrapper) Run ¶
func (w *WatchWrapper) Run()
func (*WatchWrapper) Stop ¶
func (w *WatchWrapper) Stop()