diffgenerator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

FIXME: Give me a better package name

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts ...option) (io.Reader, error)

Run creates a Reader that generates a diff in the RBD Incremental Backup format.

func WithFromSnapName

func WithFromSnapName(fromSnapName string) option

func WithHeader

func WithHeader(header string) option

func WithImageSize

func WithImageSize(imageSize uint64) option

func WithRecords

func WithRecords(records []*DataRecord) option

func WithToSnapName

func WithToSnapName(toSnapName string) option

Types

type DataRecord

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

DataRecord represents a Data Record in RBD Incremental Backup format (cf. https://docs.ceph.com/en/squid/dev/rbd-diff/).

func NewRandomUpdatedDataRecord

func NewRandomUpdatedDataRecord(offset, length uint64) *DataRecord

NewRandomUpdatedDataRecord creates a new DataRecord for Updated data with the given offset and length, filling the data with random bytes of the specified length.

func NewUpdatedDataRecord

func NewUpdatedDataRecord(offset, length uint64, data []byte) *DataRecord

NewUpdatedDataRecord creates a new DataRecord for Updated data with the given offset, length, and data.

func NewZeroDataRecord

func NewZeroDataRecord(offset, length uint64) *DataRecord

NewZeroDataRecord creates a new DataRecord for Zero data.

Jump to

Keyboard shortcuts

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