support

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionMetrics

type CollectionMetrics struct {
	Objects, Successes int
	Bytes              int64
}

func CombineMetrics

func CombineMetrics(a, b CollectionMetrics) CollectionMetrics

type ControllerOperationStatus

type ControllerOperationStatus struct {
	Folders int
	Metrics CollectionMetrics
	// contains filtered or unexported fields
}

ControllerOperationStatus is a data type used to describe the state of the sequence of operations. @param ObjectCount integer representation of how many objects have downloaded or uploaded. @param Successful: Number of objects that are sent through the connector without incident. @param incomplete: Bool representation of whether all intended items were download or uploaded. @param bytes: represents the total number of bytes that have been downloaded or uploaded.

func CreateStatus

func CreateStatus(
	ctx context.Context,
	op Operation,
	folders int,
	cm CollectionMetrics,
	details string,
) *ControllerOperationStatus

Constructor for ConnectorOperationStatus. If the counts do not agree, an error is returned.

func MergeStatus

MergeStatus combines ConnectorOperationsStatus value into a single status

func (*ControllerOperationStatus) String

func (cos *ControllerOperationStatus) String() string

func (ControllerOperationStatus) ToCollectionStats

func (cos ControllerOperationStatus) ToCollectionStats() *data.CollectionStats

ToCollectionStats turns the called ControllerOperationStatus into a *data.CollectionStats instance

TODO(ashmrtn): Remove this when we rework status handling. It's really here to avoid repeated code in each service handler.

type Operation

type Operation int
const (
	OpUnknown Operation = 0
	Backup    Operation = 1
	Restore   Operation = 2
	Export    Operation = 3
)

func (Operation) String

func (i Operation) String() string

type StatusUpdater

type StatusUpdater func(*ControllerOperationStatus)

Function signature for a status updater Used to define a function that an async connector task can call to on completion with its ConnectorOperationStatus

Jump to

Keyboard shortcuts

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