Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpObject ¶
DumpObject is a helper function to generically dump resource definition given the resource reference and file path for dumping location.
Types ¶
type Result ¶
type Result struct {
ResultStatus
Err error
}
type ResultStatus ¶
type ResultStatus int64
const ( Collected ResultStatus = iota InProgress Failed )
func (ResultStatus) String ¶
func (r ResultStatus) String() string
type SnapshotInterface ¶
type SnapshotInterface interface {
// Collect creates a request to take a snapshot.
// When worker is available to fulfill such request, RequestHandler
// will be invoked in the worker context.
// snapshotName is the name of the Snaphost instance making this request.
Collect(ctx context.Context, snapshotName string) error
// IsInProgress returns true, request to take a snaphost currently in progress.
IsInProgress(snapshot string) bool
// GetResult returns result for a given request.
GetResult(ctx context.Context, snapshostName string) Result
// ListSnapshots returns list all snapshots taken for a given Snapshot instance
ListSnapshots(snapshotInstance *utilsv1alpha1.Snapshot,
logger logr.Logger) ([]string, error)
// GetCollectedSnapshotFolder returns the artifact folder where snapshots are
// collected for a given Snapshot instance
GetCollectedSnapshotFolder(snapshotInstance *utilsv1alpha1.Snapshot,
logger logr.Logger) (*string, error)
// GetNamespacedResources returns all namespaced resources contained in the
// snapshotFoler.
// Returns a map with:
// - key: <namespace name>
// - value: list of resources of the Kind specified
GetNamespacedResources(snapshotFolder, kind string, logger logr.Logger,
) (map[string][]*unstructured.Unstructured, error)
// CleanupEntries removes any entry (from any internal data structure) for
// given snapshot request
CleanupEntries(snapshotInstance *utilsv1alpha1.Snapshot) error
}
Click to show internal directories.
Click to hide internal directories.