helper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEEKABLE    ReaderType = "seekable" // reader which supports seek
	NONSEEKABLE            = "discard"  // reader which is not seekable
	SUBSET                 = "subset"   // reader which operates on pre filtered data
)

Variables

View Source
var (
	CleanupGroup *sync.WaitGroup
)

Functions

func DoCleanup

func DoCleanup()

func DoHelper

func DoHelper()

func InitializeGlobals

func InitializeGlobals()

func InitializeSignalHandler

func InitializeSignalHandler()

Types

type BackupPipeWriterCloser

type BackupPipeWriterCloser interface {
	io.Writer
	io.Closer
}

type CommonBackupPipeWriterCloser

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

func NewCommonBackupPipeWriterCloser

func NewCommonBackupPipeWriterCloser(writeHandle io.WriteCloser) (cPipe CommonBackupPipeWriterCloser)

func (CommonBackupPipeWriterCloser) Close

func (cPipe CommonBackupPipeWriterCloser) Close() error

Never returns error, suppressing them instead

func (CommonBackupPipeWriterCloser) Write

func (cPipe CommonBackupPipeWriterCloser) Write(p []byte) (n int, err error)

type GZipBackupPipeWriterCloser

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

func NewGZipBackupPipeWriterCloser

func NewGZipBackupPipeWriterCloser(writeHandle io.WriteCloser, compressLevel int) (gzPipe GZipBackupPipeWriterCloser, err error)

func (GZipBackupPipeWriterCloser) Close

func (gzPipe GZipBackupPipeWriterCloser) Close() error

Returns errors from underlying common writer only

func (GZipBackupPipeWriterCloser) Write

func (gzPipe GZipBackupPipeWriterCloser) Write(p []byte) (n int, err error)

type ReaderType

type ReaderType string

* Restore specific functions

type RestoreReader

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

RestoreReader structure to wrap the underlying reader. * readerType identifies how the reader can be used * SEEKABLE uses seekReader. Used when restoring from uncompressed data with filters from local filesystem * NONSEEKABLE and SUBSET types uses bufReader. * SUBSET type applies when restoring using plugin(if compatible) from uncompressed data with filters * NONSEEKABLE type applies for every other restore scenario

type ZSTDBackupPipeWriterCloser

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

func NewZSTDBackupPipeWriterCloser

func NewZSTDBackupPipeWriterCloser(writeHandle io.WriteCloser, compressLevel int) (zstdPipe ZSTDBackupPipeWriterCloser, err error)

func (ZSTDBackupPipeWriterCloser) Close

func (zstdPipe ZSTDBackupPipeWriterCloser) Close() error

Returns errors from underlying common writer only

func (ZSTDBackupPipeWriterCloser) Write

func (zstdPipe ZSTDBackupPipeWriterCloser) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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