Documentation
¶
Index ¶
- type Monitor
- func NewFsNotifyMonitor(opt Option) (m Monitor, err error)
- func NewMinIOPullClientMonitor(opt Option) (m Monitor, err error)
- func NewMonitor(opt Option, run runFn) (Monitor, error)
- func NewRemoteClientMonitor(opt Option) (Monitor, error)
- func NewRemoteServerMonitor(opt Option) (m Monitor, err error)
- func NewSftpPullClientMonitor(opt Option) (m Monitor, err error)
- func NewTaskClientMonitor(opt Option, run runFn) (Monitor, error)
- type Option
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() (wait.Wait, 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 ¶
NewFsNotifyMonitor create an instance of fsNotifyMonitor to monitor the disk change
func NewMinIOPullClientMonitor ¶ added in v0.4.4
NewMinIOPullClientMonitor create an instance of minIOPullClientMonitor to pull the files from MinIO server
func NewMonitor ¶
NewMonitor create a monitor instance
func NewRemoteClientMonitor ¶
NewRemoteClientMonitor create an instance of remoteClientMonitor to monitor the remote file change
func NewRemoteServerMonitor ¶
NewRemoteServerMonitor create an instance of the fsNotifyMonitor
func NewSftpPullClientMonitor ¶ added in v0.4.4
NewSftpPullClientMonitor create an instance of sftpPullClientMonitor to pull the files from sftp server
func NewTaskClientMonitor ¶ added in v0.7.0
NewTaskClientMonitor create an instance of taskClientMonitor to receive the task from remote server
type Option ¶ added in v0.5.1
type Option struct { SyncOnce bool EnableTLS bool TLSCertFile string EnableSyncDelay bool SyncDelayEvents int SyncDelayTime time.Duration SyncWorkers int Users []*auth.User EventWriter io.Writer Syncer sync.Sync Retry retry.Retry PathIgnore ignore.PathIgnore Reporter report.Reporter EnableTaskClient bool TaskClientLabels []string TaskClientMaxWorker int }
Option the monitor component option
func NewMonitorOption ¶ added in v0.5.1
func NewMonitorOption(config conf.Config, syncer sync.Sync, retry retry.Retry, users []*auth.User, eventWriter io.Writer, pi ignore.PathIgnore, reporter report.Reporter) Option
NewMonitorOption create an instance of the Option, store all the monitor component options