proc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: AGPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package proc provides actual actions to be performed once the sync has filtered all events

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Merger

type Merger struct {
	BatchesChannel  chan *filters.Batch
	RequeueChannels map[PathSyncSource]chan EventInfo
	LocksChannel    chan filters.LockEvent
	UnlocksChannel  chan filters.UnlockEvent
	JobsInterrupt   chan bool
	GlobalContext   context.Context
	// contains filtered or unexported fields
}

func NewMerger

func NewMerger(ctx context.Context) *Merger

func (*Merger) AddRequeueChannel

func (b *Merger) AddRequeueChannel(source PathSyncSource, channel chan EventInfo)

func (*Merger) Logger

func (b *Merger) Logger() *zap.Logger

func (*Merger) ProcessBatches

func (b *Merger) ProcessBatches()

func (*Merger) RegisterEventChannel

func (b *Merger) RegisterEventChannel(out chan ProcessorEvent)

func (*Merger) Shutdown

func (b *Merger) Shutdown()

type ProcessFunc

type ProcessFunc func(event *filters.BatchedEvent, operationId string) error

type SourceDiff

type SourceDiff struct {
	Left         sync.PathSyncSource
	Right        sync.PathSyncSource
	MissingLeft  []*tree.Node
	MissingRight []*tree.Node
	Context      context.Context
}

func ComputeSourcesDiff

func ComputeSourcesDiff(ctx context.Context, left sync.PathSyncSource, right sync.PathSyncSource, strong bool) (diff *SourceDiff, err error)

func (*SourceDiff) FilterMissing

func (diff *SourceDiff) FilterMissing(source sync.PathSyncSource, target sync.PathSyncTarget, in []*tree.Node, folders bool, nofilter bool) (out map[string]*filters.BatchedEvent)

func (*SourceDiff) String

func (diff *SourceDiff) String() string

func (*SourceDiff) ToBidirectionalBatch

func (diff *SourceDiff) ToBidirectionalBatch(leftTarget sync.PathSyncTarget, rightTarget sync.PathSyncTarget) (batch *filters.BidirectionalBatch, err error)

func (*SourceDiff) ToUnidirectionalBatch

func (diff *SourceDiff) ToUnidirectionalBatch(direction string) (batch *filters.Batch, err error)

Jump to

Keyboard shortcuts

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