monitor

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

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

func NewFsNotifyMonitor(opt Option) (m Monitor, err error)

NewFsNotifyMonitor create an instance of fsNotifyMonitor to monitor the disk change

func NewMinIOPullClientMonitor added in v0.4.4

func NewMinIOPullClientMonitor(opt Option) (m Monitor, err error)

NewMinIOPullClientMonitor create an instance of minIOPullClientMonitor to pull the files from MinIO server

func NewMonitor

func NewMonitor(opt Option) (Monitor, error)

NewMonitor create a monitor instance

func NewRemoteClientMonitor

func NewRemoteClientMonitor(opt Option) (Monitor, error)

NewRemoteClientMonitor create an instance of remoteClientMonitor to monitor the remote file change

func NewRemoteServerMonitor

func NewRemoteServerMonitor(opt Option) (m Monitor, err error)

NewRemoteServerMonitor create an instance of the fsNotifyMonitor

func NewSftpPullClientMonitor added in v0.4.4

func NewSftpPullClientMonitor(opt Option) (m Monitor, err error)

NewSftpPullClientMonitor create an instance of sftpPullClientMonitor to pull the files from sftp 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
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL