clone

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSetCloner

type FileSetCloner interface {
	// Clone clones the given fileset
	Clone(src FileSetID, dest FileSetID, destBlocksize time.Duration) error
}

FileSetCloner clones a given fileset

func New

func New(opts Options) FileSetCloner

New creates a new fileset cloner

type FileSetID

type FileSetID struct {
	PathPrefix string
	Namespace  string
	Shard      uint32
	Blockstart xtime.UnixNano
}

FileSetID is the collection of identifiers required to uniquely identify a fileset

type Options

type Options interface {
	// SetBytesPool sets the bytesPool
	SetBytesPool(bytesPool pool.CheckedBytesPool) Options

	// BytesPool returns the bytesPool
	BytesPool() pool.CheckedBytesPool

	// SetDecodingOptions sets the decoding options
	SetDecodingOptions(decodingOpts msgpack.DecodingOptions) Options

	// DecodingOptions returns the decoding options
	DecodingOptions() msgpack.DecodingOptions

	// SetBufferSize sets the buffer size
	SetBufferSize(int) Options

	// BufferSize returns the buffer size
	BufferSize() int

	// SetFileMode sets the fileMode used for file creation
	SetFileMode(os.FileMode) Options

	// FileMode returns the fileMode used for file creation
	FileMode() os.FileMode

	// SetDirMode sets the file mode used for dir creation
	SetDirMode(os.FileMode) Options

	// DirMode returns the file mode used for dir creation
	DirMode() os.FileMode
}

Options represents the knobs available while cloning

func NewOptions

func NewOptions() Options

NewOptions returns the new options

Jump to

Keyboard shortcuts

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