replicationfs

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPrimaryFileIsNull = errors.New("replication: primary file is null")

Functions

func Sync

func Sync(option *UtilsSync, primary vfs.Filesystem, secondary ...vfs.Filesystem) error

Types

type ReplicationFS

type ReplicationFS struct {
	// contains filtered or unexported fields
}

func NewReplication

func NewReplication(primary vfs.Filesystem, secondary ...vfs.Filesystem) *ReplicationFS

func (*ReplicationFS) Lstat

func (ctx *ReplicationFS) Lstat(name string) (fs.FileInfo, error)

func (*ReplicationFS) Mkdir

func (ctx *ReplicationFS) Mkdir(name string, perm os.FileMode) error

func (*ReplicationFS) Open

func (ctx *ReplicationFS) Open(name string) (vfs.File, error)

func (*ReplicationFS) OpenFile

func (ctx *ReplicationFS) OpenFile(name string, flag int, perm os.FileMode) (vfs.File, error)

func (*ReplicationFS) PathSeparator

func (ctx *ReplicationFS) PathSeparator() uint8

func (*ReplicationFS) RReadDir

func (ctx *ReplicationFS) RReadDir(path string) ([]fs.FileInfo, [][]fs.FileInfo, error)

func (*ReplicationFS) ReadDir

func (ctx *ReplicationFS) ReadDir(path string) ([]fs.FileInfo, error)

func (*ReplicationFS) Remove

func (ctx *ReplicationFS) Remove(name string) error

func (*ReplicationFS) Rename

func (ctx *ReplicationFS) Rename(oldpath string, newpath string) error

func (*ReplicationFS) Stat

func (ctx *ReplicationFS) Stat(name string) (fs.FileInfo, error)
func (ctx *ReplicationFS) Symlink(oldname, newname string) error

type UtilsSync

type UtilsSync struct {
	// Delete files with different content
	ReplaceDifferencesFiles bool
	// Delete secondary files that do not exist in the primary file system
	DeleteNotExistingFiles bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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