datasync

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

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 UploadChunkSize = 64 * 1024

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

Functions

func NewClient added in v0.0.6

func NewClient(conn rpc.ClientConn) v1.DataSyncServiceClient

NewClient constructs a new v1.DataSyncServiceClient using the passed in connection.

func NewConnection added in v0.0.6

func NewConnection(logger *zap.SugaredLogger, address string, rpcOpts []rpc.DialOption) (rpc.ClientConn, error)

NewConnection builds a connection to the passed address with the passed rpcOpts.

Types

type Manager

type Manager interface {
	SyncDirectory(dir string)
	Close()
}

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

func NewDefaultManager added in v0.0.6

func NewDefaultManager(logger golog.Logger, cfg *config.Config, lastModMillis int) (Manager, error)

NewDefaultManager returns the default Manager that syncs data to app.viam.com.

func NewManager added in v0.0.6

func NewManager(logger golog.Logger, partID string, client v1.DataSyncServiceClient,
	conn rpc.ClientConn, lastModifiedMillis int,
) (Manager, error)

NewManager returns a new syncer.

type ManagerConstructor added in v0.0.6

type ManagerConstructor func(logger golog.Logger, cfg *config.Config, lastModMillis int) (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