proc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: AGPL-3.0 Imports: 15 Imported by: 0

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