Documentation ¶
Overview ¶
Package task defines a synchronization task
Index ¶
- type Sync
- func (s *Sync) BroadcastCloseSession(sessionUuid string)
- func (s *Sync) Capture(ctx context.Context, targetFolder string) error
- func (s *Sync) Pause(ctx context.Context)
- func (s *Sync) ReApplyPatch(ctx context.Context, patch merger.Patch)
- func (s *Sync) Resume(ctx context.Context)
- func (s *Sync) RootStats(ctx context.Context, useSnapshots bool) (map[string]*model.EndpointRootStat, error)
- func (s *Sync) Run(ctx context.Context, dryRun bool, force bool) (model.Stater, error)
- func (s *Sync) SetFilters(roots []string, excludes []string)
- func (s *Sync) SetPatchListener(listener merger.PatchListener)
- func (s *Sync) SetSnapshotFactory(factory model.SnapshotFactory)
- func (s *Sync) SetupCmd(cmd *model.Command)
- func (s *Sync) SetupEventsChan(statusChan chan model.Status, batchDone chan interface{}, ...)
- func (s *Sync) Shutdown()
- func (s *Sync) Start(ctx context.Context, withWatches bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sync ¶
type Sync struct { Source model.Endpoint Target model.Endpoint Direction model.DirectionType Roots []string Ignores []glob.Glob SkipTargetChecks bool FailsafeDeletes bool // contains filtered or unexported fields }
func (*Sync) BroadcastCloseSession ¶
BroadcastCloseSession forwards session id to underlying batchers
func (*Sync) SetFilters ¶
SetFilters allows passing selective roots (includes) and ignores (excludes). Ignores are a list of patterns conforming to the glob standard, with support for double star
func (*Sync) SetPatchListener ¶
func (s *Sync) SetPatchListener(listener merger.PatchListener)
SetPatchListener adds a listener on the Patch channel to do something with patches before they are processed
func (*Sync) SetSnapshotFactory ¶
func (s *Sync) SetSnapshotFactory(factory model.SnapshotFactory)
SetSnapshotFactory set up a factory for loading/saving snapshots
func (*Sync) SetupEventsChan ¶
func (s *Sync) SetupEventsChan(statusChan chan model.Status, batchDone chan interface{}, events chan interface{})
SetupEventsChan wires internal sync event to external status channels
Click to show internal directories.
Click to hide internal directories.