monitor

package
v0.0.0-...-e38a99a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 27 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) (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

func NewRemoteServerMonitor

func NewRemoteServerMonitor(syncer sync.Sync, retry retry.Retry, syncOnce bool, eventWriter io.Writer) (m Monitor, err error)

Jump to

Keyboard shortcuts

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