sync

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenFilesKeyPrefix        = "openFiles#"
	ReverseOpenFilesKeyPrefix = "reverseOpenFiles#"
)

Variables

View Source
var (
	ErrAddFileWatch = errors.New("error adding file to watch")
)

Functions

func New

func New(
	folderWatcher watcher.FolderWatcher,
	textileClient textile.Client,
	store store.Store,
	notifier GrpcNotifier,
) *bucketSynchronizer

Creates a new bucketSynchronizer instancelistenerEventHandler

Types

type BucketSynchronizer

type BucketSynchronizer interface {
	WaitForReady() chan bool
	Start(ctx context.Context) error
	Shutdown() error
	RegisterNotifier(notifier GrpcNotifier)
	AddFileWatch(addFileInfo domain.AddWatchFile) error
	GetOpenFilePath(bucketSlug string, bucketPath string) (string, bool)
}

type GrpcNotifier added in v0.0.3

type GrpcNotifier interface {
	SendFileEvent(event events.FileEvent)
	SendTextileEvent(event events.TextileEvent)
}

type TextileNotifier added in v0.0.4

type TextileNotifier interface {
	SendTextileEvent(event events.TextileEvent)
}

Jump to

Keyboard shortcuts

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