monitor

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 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() 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, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (m Monitor, err error)

NewFsNotifyMonitor create an instance of fsNotifyMonitor to monitor the disk change

func NewMinIOPullClientMonitor added in v0.4.4

func NewMinIOPullClientMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (m Monitor, err error)

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

func NewMonitor

func NewMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, enableTLS bool, certFile string, insecureSkipVerify bool, users []*auth.User, eventWriter io.Writer, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (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, certFile string, insecureSkipVerify bool, users []*auth.User, eventWriter io.Writer, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (Monitor, error)

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

func NewRemoteServerMonitor

func NewRemoteServerMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (m Monitor, err error)

NewRemoteServerMonitor create an instance of the fsNotifyMonitor

func NewSftpPullClientMonitor added in v0.4.4

func NewSftpPullClientMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer, enableSyncDelay bool, syncDelayEvents int, syncDelayTime time.Duration) (m Monitor, err error)

NewSftpPullClientMonitor create an instance of sftpPullClientMonitor to pull the files from sftp server

Jump to

Keyboard shortcuts

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