Documentation
¶
Index ¶
- type Monitor
- func NewFsNotifyMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer) (m Monitor, err error)
- func NewMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, enableTLS bool, ...) (Monitor, error)
- func NewRemoteClientMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, host string, port int, ...) (Monitor, error)
- func NewRemoteServerMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer) (m Monitor, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor interface {
// Start go to start the monitor to monitor the file change
Start() error
// Close stop the monitor
Close() error
// SyncCron register sync cron task, if spec is empty then ignore it
SyncCron(spec string) error
// Shutdown exit the Start
Shutdown() error
}
Monitor file system monitor
func NewFsNotifyMonitor ¶
func NewFsNotifyMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer) (m Monitor, err error)
NewFsNotifyMonitor create an instance of fsNotifyMonitor to monitor the disk change
func NewMonitor ¶
func NewMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, enableTLS bool, users []*auth.User, eventWriter io.Writer) (Monitor, error)
NewMonitor create a monitor instance syncer a Sync component retry a Retry component syncOnce tag a sync once command, the sync once command will execute when call the Start
func NewRemoteClientMonitor ¶
func NewRemoteClientMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, host string, port int, enableTLS bool, users []*auth.User, eventWriter io.Writer) (Monitor, error)
NewRemoteClientMonitor create an instance of remoteClientMonitor to monitor the remote file change
Click to show internal directories.
Click to hide internal directories.