Documentation
¶
Overview ¶
Package exporter provides a filesystem watcher that mirrors changes between the cluster file system and a local directory for OS-level sharing.
Index ¶
- type Logger
- type Syncer
- func (e *Syncer) Mkdir(clusterPath string) error
- func (e *Syncer) MkdirWithModTime(clusterPath string, modTime time.Time) error
- func (e *Syncer) RemoveDir(clusterPath string) error
- func (e *Syncer) RemoveFile(clusterPath string) error
- func (e *Syncer) Run(ctx context.Context)
- func (e *Syncer) SetCurrentFileCallback(fn func(string))
- func (e *Syncer) WriteFile(clusterPath string, data []byte, modTime time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer mirrors files/directories from the cluster FS to a local directory so the OS can share them via SMB/CIFS or other means.
func NewFileSyncer ¶
func NewFileSyncer(exportDir string, importDir string, clusterDir string, excludeDirs string, logger *log.Logger, fs types.FileSystemLike) (*Syncer, error)
NewFileSyncer creates a new syncer with export and import directories.
func (*Syncer) MkdirWithModTime ¶
func (*Syncer) RemoveFile ¶
func (*Syncer) SetCurrentFileCallback ¶
SetCurrentFileCallback sets the callback to update current file for monitoring
Click to show internal directories.
Click to hide internal directories.