Documentation ¶
Overview ¶
Package filters provides batchers and filters to analyze and simplify sync events
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { CreateFiles map[string]*BatchedEvent CreateFolders map[string]*BatchedEvent Deletes map[string]*BatchedEvent FileMoves map[string]*BatchedEvent FolderMoves map[string]*BatchedEvent SessionProvider sync.SessionProvider SessionProviderContext context.Context StatusChan chan BatchProcessStatus }
type BatchProcessStatus ¶
type BatchedEvent ¶
type BatchedEvent struct { EventInfo sync.EventInfo Node *tree.Node Key string Source sync.PathSyncSource Target sync.PathSyncTarget }
type BidirectionalBatch ¶
type EchoFilter ¶
type EchoFilter struct { LockEvents chan LockEvent UnlockEvents chan UnlockEvent // contains filtered or unexported fields }
func NewEchoFilter ¶
func NewEchoFilter() (ef *EchoFilter)
func (*EchoFilter) CreateFilter ¶
func (f *EchoFilter) CreateFilter() (in chan common.EventInfo, out chan common.EventInfo)
func (*EchoFilter) ListenLocksEvents ¶
func (f *EchoFilter) ListenLocksEvents()
type EventsBatcher ¶
type EventsBatcher struct { Source common.PathSyncSource Target common.PathSyncTarget // contains filtered or unexported fields }
func NewEventsBatcher ¶
func NewEventsBatcher(ctx context.Context, source common.PathSyncSource, target common.PathSyncTarget) *EventsBatcher
func (*EventsBatcher) BatchEvents ¶
func (*EventsBatcher) FilterBatch ¶
func (ev *EventsBatcher) FilterBatch(batch *Batch)
func (*EventsBatcher) ProcessEvents ¶
func (ev *EventsBatcher) ProcessEvents(events []common.EventInfo)
func (*EventsBatcher) RegisterEventChannel ¶
func (ev *EventsBatcher) RegisterEventChannel(out chan common.ProcessorEvent)
type LockEvent ¶
type LockEvent struct { Source common.PathSyncSource Path string OperationId string }
type UnlockEvent ¶
type UnlockEvent struct { Source common.PathSyncSource Path string }
Click to show internal directories.
Click to hide internal directories.