Documentation ¶
Overview ¶
Package filters provides batchers and filters to analyze and simplify sync events
Index ¶
- type Batch
- type BatchProcessStatus
- type BatchedEvent
- type BidirectionalBatch
- type EchoFilter
- type EventsBatcher
- func (ev *EventsBatcher) BatchEvents(in chan common.EventInfo, out chan *Batch, duration time.Duration)
- func (ev *EventsBatcher) FilterBatch(batch *Batch)
- func (ev *EventsBatcher) ForceCloseSession(sessionUuid string)
- func (ev *EventsBatcher) ProcessEvents(events []common.EventInfo, asSession bool)
- func (ev *EventsBatcher) RegisterEventChannel(out chan common.ProcessorEvent)
- type LockEvent
- type Move
- type UnlockEvent
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 RefreshFilesUuid map[string]*BatchedEvent SessionProvider sync.SessionProvider SessionProviderContext context.Context StatusChan chan BatchProcessStatus DoneChan chan bool }
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) ForceCloseSession ¶ added in v1.5.0
func (ev *EventsBatcher) ForceCloseSession(sessionUuid string)
func (*EventsBatcher) ProcessEvents ¶
func (ev *EventsBatcher) ProcessEvents(events []common.EventInfo, asSession bool)
func (*EventsBatcher) RegisterEventChannel ¶
func (ev *EventsBatcher) RegisterEventChannel(out chan common.ProcessorEvent)
type LockEvent ¶
type LockEvent struct { Source common.PathSyncSource Path string OperationId string }
type Move ¶ added in v1.5.0
type Move struct {
// contains filtered or unexported fields
}
func (*Move) MarshalLogObject ¶ added in v1.5.0
func (m *Move) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type UnlockEvent ¶
type UnlockEvent struct { Source common.PathSyncSource Path string }
Click to show internal directories.
Click to hide internal directories.