Documentation ¶
Overview ¶
Package builtin captures data from a robot's components, persists the captured data to disk and sync it to the cloud when possible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCaptureDirectoryConfigurationDisabled happens when the viam-server is run with // `-untrusted-env` and the capture directory is not `~/.viam/capture`. ErrCaptureDirectoryConfigurationDisabled = errors.New("changing the capture directory is prohibited in this environment") )
Functions ¶
func New ¶ added in v0.44.0
func New( ctx context.Context, deps resource.Dependencies, conf resource.Config, cloudClientConstructor func(grpc.ClientConnInterface) v1.DataSyncServiceClient, connToConnectivityStateEnabled func(conn rpc.ClientConn) datasync.ConnectivityState, logger logging.Logger, ) (datamanager.Service, error)
New returns a new builtin data manager service for the given robot.
Types ¶
type Config ¶
type Config struct { // Sync & Capture CaptureDir string `json:"capture_dir"` Tags []string `json:"tags"` // Capture CaptureDisabled bool `json:"capture_disabled"` DeleteEveryNthWhenDiskFull int `json:"delete_every_nth_when_disk_full"` MaximumCaptureFileSizeBytes int64 `json:"maximum_capture_file_size_bytes"` MongoCaptureConfig *capture.MongoConfig `json:"mongo_capture_config"` // Sync AdditionalSyncPaths []string `json:"additional_sync_paths"` FileLastModifiedMillis int `json:"file_last_modified_millis"` MaximumNumSyncThreads int `json:"maximum_num_sync_threads"` ScheduledSyncDisabled bool `json:"sync_disabled"` SelectiveSyncerName string `json:"selective_syncer_name"` SyncIntervalMins float64 `json:"sync_interval_mins"` }
Config describes how to configure the service. See sync.Config and capture.Config for docs on what each field does to both sync & capture respectively.
type DataTimeRange ¶ added in v0.44.0
DataTimeRange represents a time range from Start to End.
type DirSummary ¶ added in v0.44.0
type DirSummary struct { Path string FileSize int64 FileCount int64 Err error DataTimeRange *DataTimeRange }
DirSummary represents a summary of the files in that directory including file counts, total size of files in that directory and the time range of data capture files (both .capture and .prog) in that directory. File and directory errors are accumulated on Err.
func DiskSummary ¶ added in v0.44.0
func DiskSummary(ctx context.Context, rootPath string) []DirSummary
DiskSummary summarizes the provided sync path and all sub directories. The rootPath can either be the viam capture dir which data capture collectors write to or an additional sync path that contains arbitrary files. It will return a slice of DirSummary structs. Directories with no filesare ignored.
Directories ¶
Path | Synopsis |
---|---|
Package capture implements datacapture for the builtin datamanger
|
Package capture implements datacapture for the builtin datamanger |
package main prints a disk summary of the builtin data manager's capture directory or additional sync paths It exists purely as a convenience utilty for viam developers & solutions engineers.
|
package main prints a disk summary of the builtin data manager's capture directory or additional sync paths It exists purely as a convenience utilty for viam developers & solutions engineers. |
Package sync implements datasync for the builtin datamanger
|
Package sync implements datasync for the builtin datamanger |