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 { SyncFile(path string) Close() }
Manager is responsible for enqueuing files in captureDir and uploading them to the cloud.
func NewDefaultManager ¶ added in v0.0.6
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, ) (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.
Click to show internal directories.
Click to hide internal directories.