Documentation
¶
Overview ¶
Package mirror provides support for the infrastructure-specific mirror tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mirror ¶
type Mirror struct { NumWorkers uint Source Source Target Target // contains filtered or unexported fields }
Mirror is a struct which knows how to use the Src and Store functions to copy a tlog-tiles compliant log from one location to another.
The checkpoint will only be stored once all static resources have been successfully copied. Errors fetching or storing operations will cause the operation to be retried a few times before eventually giving up.
Note that this function _only copies the data_; no self-consistency or correctness checking of the copied tiles/entries/checkpoint is undertaken.
type Source ¶
type Source interface { ReadCheckpoint(ctx context.Context) ([]byte, error) ReadTile(ctx context.Context, l, i uint64, p uint8) ([]byte, error) ReadEntryBundle(_ context.Context, i uint64, p uint8) ([]byte, error) }
Source describes a type which can fetch static resources from a source log, like the .*Fetcher implementations in the client package.
type Target ¶
type Target interface { ReadCheckpoint(ctx context.Context) ([]byte, error) WriteCheckpoint(ctx context.Context, data []byte) error WriteTile(ctx context.Context, l, i uint64, p uint8, data []byte) error WriteEntryBundle(ctx context.Context, i uint64, p uint8, data []byte) error }
Target describes a type which can store log static resources.