Documentation
¶
Overview ¶
Package endpoint implements replication endpoints for use with package replication.
Index ¶
- Constants
- func TestClientIdentity(rootFS *zfs.DatasetPath, clientIdentity string) error
- func WithLogger(ctx context.Context, log Logger) context.Context
- type FSFilter
- type FSMap
- type Logger
- type Receiver
- func (s *Receiver) DestroySnapshots(ctx context.Context, req *pdu.DestroySnapshotsReq) (*pdu.DestroySnapshotsRes, error)
- func (s *Receiver) ListFilesystemVersions(ctx context.Context, req *pdu.ListFilesystemVersionsReq) (*pdu.ListFilesystemVersionsRes, error)
- func (s *Receiver) ListFilesystems(ctx context.Context, req *pdu.ListFilesystemReq) (*pdu.ListFilesystemRes, error)
- func (s *Receiver) Ping(ctx context.Context, req *pdu.PingReq) (*pdu.PingRes, error)
- func (s *Receiver) PingDataconn(ctx context.Context, req *pdu.PingReq) (*pdu.PingRes, error)
- func (s *Receiver) Receive(ctx context.Context, req *pdu.ReceiveReq, receive zfs.StreamCopier) (*pdu.ReceiveRes, error)
- func (s *Receiver) ReplicationCursor(context.Context, *pdu.ReplicationCursorReq) (*pdu.ReplicationCursorRes, error)
- func (s *Receiver) Send(ctx context.Context, req *pdu.SendReq) (*pdu.SendRes, zfs.StreamCopier, error)
- func (s *Receiver) WaitForConnectivity(ctx context.Context) error
- type Sender
- func (p *Sender) DestroySnapshots(ctx context.Context, req *pdu.DestroySnapshotsReq) (*pdu.DestroySnapshotsRes, error)
- func (s *Sender) ListFilesystemVersions(ctx context.Context, r *pdu.ListFilesystemVersionsReq) (*pdu.ListFilesystemVersionsRes, error)
- func (s *Sender) ListFilesystems(ctx context.Context, r *pdu.ListFilesystemReq) (*pdu.ListFilesystemRes, error)
- func (p *Sender) Ping(ctx context.Context, req *pdu.PingReq) (*pdu.PingRes, error)
- func (p *Sender) PingDataconn(ctx context.Context, req *pdu.PingReq) (*pdu.PingRes, error)
- func (p *Sender) Receive(ctx context.Context, r *pdu.ReceiveReq, receive zfs.StreamCopier) (*pdu.ReceiveRes, error)
- func (p *Sender) ReplicationCursor(ctx context.Context, req *pdu.ReplicationCursorReq) (*pdu.ReplicationCursorRes, error)
- func (s *Sender) Send(ctx context.Context, r *pdu.SendReq) (*pdu.SendRes, zfs.StreamCopier, error)
- func (p *Sender) WaitForConnectivity(ctx context.Context) error
Constants ¶
View Source
const (
ClientIdentityKey contextKey
)
Variables ¶
This section is empty.
Functions ¶
func TestClientIdentity ¶
func TestClientIdentity(rootFS *zfs.DatasetPath, clientIdentity string) error
Types ¶
type FSMap ¶
type FSMap interface {
FSFilter
Map(path *zfs.DatasetPath) (*zfs.DatasetPath, error)
Invert() (FSMap, error)
AsFilter() FSFilter
}
FIXME: can we get away without error types here?
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver implements replication.ReplicationEndpoint for a receiving side
func NewReceiver ¶
func NewReceiver(rootDataset *zfs.DatasetPath, appendClientIdentity bool) *Receiver
func (*Receiver) DestroySnapshots ¶
func (s *Receiver) DestroySnapshots(ctx context.Context, req *pdu.DestroySnapshotsReq) (*pdu.DestroySnapshotsRes, error)
func (*Receiver) ListFilesystemVersions ¶
func (s *Receiver) ListFilesystemVersions(ctx context.Context, req *pdu.ListFilesystemVersionsReq) (*pdu.ListFilesystemVersionsRes, error)
func (*Receiver) ListFilesystems ¶
func (s *Receiver) ListFilesystems(ctx context.Context, req *pdu.ListFilesystemReq) (*pdu.ListFilesystemRes, error)
func (*Receiver) PingDataconn ¶
func (*Receiver) Receive ¶
func (s *Receiver) Receive(ctx context.Context, req *pdu.ReceiveReq, receive zfs.StreamCopier) (*pdu.ReceiveRes, error)
func (*Receiver) ReplicationCursor ¶
func (s *Receiver) ReplicationCursor(context.Context, *pdu.ReplicationCursorReq) (*pdu.ReplicationCursorRes, error)
type Sender ¶
type Sender struct {
FSFilter zfs.DatasetFilter
}
Sender implements replication.ReplicationEndpoint for a sending side
func NewSender ¶
func NewSender(fsf zfs.DatasetFilter) *Sender
func (*Sender) DestroySnapshots ¶
func (p *Sender) DestroySnapshots(ctx context.Context, req *pdu.DestroySnapshotsReq) (*pdu.DestroySnapshotsRes, error)
func (*Sender) ListFilesystemVersions ¶
func (s *Sender) ListFilesystemVersions(ctx context.Context, r *pdu.ListFilesystemVersionsReq) (*pdu.ListFilesystemVersionsRes, error)
func (*Sender) ListFilesystems ¶
func (s *Sender) ListFilesystems(ctx context.Context, r *pdu.ListFilesystemReq) (*pdu.ListFilesystemRes, error)
func (*Sender) PingDataconn ¶
func (*Sender) Receive ¶
func (p *Sender) Receive(ctx context.Context, r *pdu.ReceiveReq, receive zfs.StreamCopier) (*pdu.ReceiveRes, error)
func (*Sender) ReplicationCursor ¶
func (p *Sender) ReplicationCursor(ctx context.Context, req *pdu.ReplicationCursorReq) (*pdu.ReplicationCursorRes, error)
Click to show internal directories.
Click to hide internal directories.