clone

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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