Documentation
¶
Index ¶
Constants ¶
View Source
const ( ReadNextByte = iota ReadNextBlock ReadNone )
consts...
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockRequester ¶
type BlockRequester interface {
DoRequest(startOffset int64, enfOffset int64) (data []byte, err error)
}
BlockRequester does synchronous requests on a remote source of blocks
type Config ¶
type Config struct {
// BlockSize force a fixed checksum block-size
BlockSize int64
// Logger is the logger used for gosync log.
Logger logging.Logger
// A hash function for calculating a strong checksum
StrongHasher hash.Hash
// MaxRequestBlockSize defines the maximum file block size for the remote transfer
MaxRequestBlockSize int64
// Resolver is an interface used by the patchers to obtain blocks from the source.
Requester BlockRequester
// Function for getting the file size
SizeFunc func() (int64, error)
}
Config contains the parameters to start a gosync service.
type GoSync ¶
type GoSync interface {
Sign(io.Reader) *syncpb.ChunkChecksums
Delta(io.ReaderAt, *syncpb.ChunkChecksums) (*syncpb.PatcherBlockSpan, error)
Patch(io.ReadSeeker, *syncpb.PatcherBlockSpan, io.Writer) error
}
GoSync represents a rsync service
type ReadSeekerAt ¶
type ReadSeekerAt interface {
io.ReadSeeker
io.ReaderAt
}
ReadSeekerAt is the combination of ReadSeeker and ReaderAt interfaces
Click to show internal directories.
Click to hide internal directories.