blobdiffer

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	FileDiffer FileDiffer
	// Limit is the max number of file differs can run at the same time
	Limit int
	// contains filtered or unexported fields
}

Factory is a helper for creating a new blob differ factory

func (Factory) New

func (f Factory) New(origin, target string, hf dlhash.Factory, exErrCh chan<- error,
	cancelCh <-chan bool, wg *sync.WaitGroup) <-chan record.Record

New creates a new BlobDiffer

type FileDiffer

type FileDiffer interface {
	DiffContents(f1, f2 FileInfo, target string, records chan<- record.Record, hf dlhash.Factory) error
}

FileDiffer defines the file differ factory interface

type FileInfo

type FileInfo interface {
	io.ReadCloser
	Size() int64
	Path() string
}

FileInfo ...

type SafeFactory

type SafeFactory struct {
	FileDiffer FileDiffer
	// Limit is the max number of file differs can run at the same time
	Limit int
	// contains filtered or unexported fields
}

SafeFactory is a helper for creating a new xattrs-based blob differ factory

func (SafeFactory) New

func (f SafeFactory) New(origin, target string, hf dlhash.Factory, exErrCh chan<- error,
	cancelCh <-chan bool, wg *sync.WaitGroup) <-chan record.Record

New creates a new BlobDiffer

Jump to

Keyboard shortcuts

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