Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackerEvent ¶
BackerEvent - Event structure which contains a filepath and an event type
type Backlog ¶
type Backlog interface { Add(path BackerEvent) Next() BackerEvent RemoveOne() (empty bool) }
Backlog - struct for maintaining a list of events to process
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
FileManager - Manages the interaction between FSNotify events and the various data backends
func NewFileManager ¶
func NewFileManager(config *shared.BackerConfig) *FileManager
NewFileManager - Helper function for creating a new FileManager
func (*FileManager) RegisterWatcherPath ¶
func (f *FileManager) RegisterWatcherPath(path string, remoteRoot string)
RegisterWatcherPath - Register a file path with the Manager, will subscribe to FSEvents for this path
type MultiFileBacklog ¶
type MultiFileBacklog struct {
// contains filtered or unexported fields
}
MultiFileBacklog - data structure for maintaining Backlog state
func NewMultiFileBacklog ¶
func NewMultiFileBacklog() *MultiFileBacklog
NewMultiFileBacklog - Creates a new Backlog
func (*MultiFileBacklog) Add ¶
func (b *MultiFileBacklog) Add(event BackerEvent)
Add - Add a file event to the backlog
func (*MultiFileBacklog) Next ¶
func (b *MultiFileBacklog) Next() BackerEvent
Next - retrieves the next BackerEvent from the Backlog
func (*MultiFileBacklog) RemoveOne ¶
func (b *MultiFileBacklog) RemoveOne() bool
RemoveOne - Removes a single BackerEvent from the Backlog
type RPC ¶
type RPC struct {
Config *shared.BackerConfig
}
RPC - RPC interface
func (*RPC) ListWatchers ¶
func (r *RPC) ListWatchers(args int, watchers *shared.FileWatchers) error
ListWatchers - Implementation from the interface definition