datasync

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package datasync contains interfaces for syncing data from robots to the app.viam.com cloud.

Index

Constants

View Source
const FailedDir = "failed"

FailedDir is a subdirectory of the capture directory that holds any files that could not be synced.

Variables

View Source
var (
	// InitialWaitTimeMillis defines the time to wait on the first retried upload attempt.
	InitialWaitTimeMillis = atomic.NewInt32(1000)
	// RetryExponentialFactor defines the factor by which the retry wait time increases.
	RetryExponentialFactor = atomic.NewInt32(2)
)
View Source
var MaxUnaryFileSize = int64(units.MB)

MaxUnaryFileSize is the max number of bytes to send using the unary DataCaptureUpload, as opposed to the StreamingDataCaptureUpload.

View Source
var UploadChunkSize = 64 * 1024

UploadChunkSize defines the size of the data included in each message of a FileUpload stream.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	SyncFile(path string)
	SetArbitraryFileTags(tags []string)
	Close()
}

Manager is responsible for enqueuing files in captureDir and uploading them to the cloud.

func NewManager added in v0.0.6

func NewManager(identity string, client v1.DataSyncServiceClient, logger logging.Logger, captureDir string) (Manager, error)

NewManager returns a new syncer.

func NewNoopManager added in v0.2.25

func NewNoopManager() Manager

NewNoopManager returns a noop sync manager that does nothing.

type ManagerConstructor added in v0.0.6

type ManagerConstructor func(identity string, client v1.DataSyncServiceClient, logger logging.Logger, captureDir string) (Manager, error)

ManagerConstructor is a function for building a Manager.

Jump to

Keyboard shortcuts

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