k8up

package
v4.94.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

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

func (c *ConcreteSnapshotHandler) GetFromEvent(in watch.Event) (*k8upv1.Snapshot, error)

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL