Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionMetrics ¶
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 ¶
func MergeStatus(one, two ControllerOperationStatus) ControllerOperationStatus
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 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