file

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FSNOTIFY = "fsnotify"
	FILEINFO = "fileinfo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sync

type Sync struct {
	URI    string
	Logger *logger.Logger

	Mux *msync.RWMutex
	// contains filtered or unexported fields
}

func NewFileSync added in v0.7.3

func NewFileSync(uri string, watchType string, logger *logger.Logger) *Sync

func (*Sync) Init

func (fs *Sync) Init(ctx context.Context) error

func (*Sync) IsReady

func (fs *Sync) IsReady() bool

func (*Sync) ReSync

func (fs *Sync) ReSync(ctx context.Context, dataSync chan<- sync.DataSync) error

func (*Sync) Sync

func (fs *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error

type Watcher added in v0.10.2

type Watcher interface {
	Close() error
	Add(name string) error
	Remove(name string) error
	WatchList() []string
	Events() chan fsnotify.Event
	Errors() chan error
}

func NewFSNotifyWatcher added in v0.10.2

func NewFSNotifyWatcher() (Watcher, error)

NewFsNotifyWatcher returns a new fsNotifyWatcher

func NewFileInfoWatcher added in v0.10.2

func NewFileInfoWatcher(ctx context.Context, logger *logger.Logger) Watcher

NewFsNotifyWatcher returns a new fsNotifyWatcher

Jump to

Keyboard shortcuts

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