Documentation ¶
Index ¶
- Variables
- type ConcreteSnapshotHandler
- func (c *ConcreteSnapshotHandler) Get(ctx context.Context, id, instanceNamespace string) (*k8upv1.Snapshot, error)
- func (c *ConcreteSnapshotHandler) GetFromEvent(in watch.Event) (*k8upv1.Snapshot, error)
- func (c *ConcreteSnapshotHandler) List(ctx context.Context, instanceNamespace string) (*k8upv1.SnapshotList, error)
- func (c *ConcreteSnapshotHandler) Watch(ctx context.Context, namespace string, ...) (watch.Interface, error)
- type Snapshothandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( K8upGVR = schema.GroupVersionResource{ Group: k8upv1.GroupVersion.Group, Version: k8upv1.GroupVersion.Version, Resource: "snapshots", } )
Functions ¶
This section is empty.
Types ¶
type ConcreteSnapshotHandler ¶
type ConcreteSnapshotHandler struct {
// contains filtered or unexported fields
}
ConcreteSnapshotHandler implements Snapshothandler.
func (*ConcreteSnapshotHandler) Get ¶
func (c *ConcreteSnapshotHandler) Get(ctx context.Context, id, instanceNamespace string) (*k8upv1.Snapshot, error)
Get returns the snapshot with the given ID.
func (*ConcreteSnapshotHandler) GetFromEvent ¶
GetFromEvent resolves watch.Event into k8upv1.Snapshot
func (*ConcreteSnapshotHandler) List ¶
func (c *ConcreteSnapshotHandler) List(ctx context.Context, instanceNamespace string) (*k8upv1.SnapshotList, error)
List returns all snapshots in the given namespace.
func (*ConcreteSnapshotHandler) Watch ¶
func (c *ConcreteSnapshotHandler) Watch(ctx context.Context, namespace string, options *metainternalversion.ListOptions) (watch.Interface, error)
Watch returns a watcher for the given objects
type Snapshothandler ¶
type Snapshothandler interface { Get(ctx context.Context, id, instanceNamespace string) (*k8upv1.Snapshot, error) List(ctx context.Context, instanceNamespace string) (*k8upv1.SnapshotList, error) Watch(ctx context.Context, namespace string, options *metainternalversion.ListOptions) (watch.Interface, error) GetFromEvent(in watch.Event) (*k8upv1.Snapshot, error) }
Snapshothandler is an interface that handles listing and getting of k8up snapsthots.
func New ¶
func New(client client.WithWatch) Snapshothandler
New returns a new Snapshothandler implemented by ConcreteSnapshotHandler.
Click to show internal directories.
Click to hide internal directories.