Documentation ¶
Index ¶
Constants ¶
View Source
const ( DontCare = 0x0 False = 0x1 True = 0x2 )
Variables ¶
This section is empty.
Functions ¶
func ReplicationConfigFromConfig ¶ added in v0.3.0
func ReplicationConfigFromConfig(in *config.Replication) (*pdu.ReplicationConfig, error)
func TriFromBool ¶ added in v0.3.0
func TriFromBool(b bool) tri
Types ¶
type Endpoint ¶
type Endpoint interface { // Does not include placeholder filesystems ListFilesystems(ctx context.Context, req *pdu.ListFilesystemReq) (*pdu.ListFilesystemRes, error) ListFilesystemVersions(ctx context.Context, req *pdu.ListFilesystemVersionsReq) (*pdu.ListFilesystemVersionsRes, error) DestroySnapshots(ctx context.Context, req *pdu.DestroySnapshotsReq) (*pdu.DestroySnapshotsRes, error) WaitForConnectivity(ctx context.Context) error }
Endpoint represents one side of the replication.
An endpoint is either in Sender or Receiver mode, represented by the correspondingly named interfaces defined in this package.
type Filesystem ¶
type Filesystem struct { Path string // compat // contains filtered or unexported fields }
func (*Filesystem) EqualToPreviousAttempt ¶
func (f *Filesystem) EqualToPreviousAttempt(other driver.FS) bool
func (*Filesystem) ReportInfo ¶
func (f *Filesystem) ReportInfo() *report.FilesystemInfo
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
func NewPlanner ¶
func NewPlanner(secsPerState *prometheus.HistogramVec, bytesReplicated *prometheus.CounterVec, sender Sender, receiver Receiver, policy PlannerPolicy) *Planner
caller must ensure policy.Validate() == nil
type PlannerPolicy ¶ added in v0.3.0
type PlannerPolicy struct { EncryptedSend tri // all sends must be encrypted (send -w, and encryption!=off) ReplicationConfig *pdu.ReplicationConfig SizeEstimationConcurrency int `validate:"gte=1"` }
func (PlannerPolicy) Validate ¶ added in v0.4.0
func (p PlannerPolicy) Validate() error
type Receiver ¶
type Receiver interface { Endpoint // Receive sends r and sendStream (the latter containing a ZFS send stream) // to the parent github.com/zrepl/zrepl/replication.Endpoint. Receive(ctx context.Context, req *pdu.ReceiveReq, receive io.ReadCloser) (*pdu.ReceiveRes, error) }
type Sender ¶
type Sender interface { Endpoint // If a non-nil io.ReadCloser is returned, it is guaranteed to be closed before // any next call to the parent github.com/zrepl/zrepl/replication.Endpoint. // If the send request is for dry run the io.ReadCloser will be nil Send(ctx context.Context, r *pdu.SendReq) (*pdu.SendRes, io.ReadCloser, error) SendCompleted(ctx context.Context, r *pdu.SendCompletedReq) (*pdu.SendCompletedRes, error) ReplicationCursor(ctx context.Context, req *pdu.ReplicationCursorReq) (*pdu.ReplicationCursorRes, error) }
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
func (*Step) ReportInfo ¶
func (*Step) TargetDate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.