mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
rpc: Initial|IncrementalTransferRequest transfer zfs data structures
This commit is contained in:
parent
fa97d3d98a
commit
cd8796aed4
@ -19,12 +19,10 @@ func (h Handler) HandleFilesystemVersionsRequest(r rpc.FilesystemVersionsRequest
|
||||
return
|
||||
}
|
||||
|
||||
func (h Handler) HandleInitialTransferRequest(r rpc.InitialTransferRequest) (io.Reader, error) {
|
||||
// TODO ACL
|
||||
return zfs.InitialSend(r.Snapshot)
|
||||
func (h Handler) HandleInitialTransferRequest(r rpc.InitialTransferRequest) (stream io.Reader, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (h Handler) HandleIncrementalTransferRequest(r rpc.IncrementalTransferRequest) (io.Reader, error) {
|
||||
// TODO ACL
|
||||
return zfs.IncrementalSend(r.FromSnapshot, r.ToSnapshot)
|
||||
func (h Handler) HandleIncrementalTransferRequest(r rpc.IncrementalTransferRequest) (stream io.Reader, err error) {
|
||||
return
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ type FilesystemVersionsRequest struct {
|
||||
}
|
||||
|
||||
type InitialTransferRequest struct {
|
||||
Snapshot string // tank/my/db@ljlsdjflksdf
|
||||
Filesystem zfs.DatasetPath
|
||||
FilesystemVersion zfs.FilesystemVersion
|
||||
}
|
||||
|
||||
func (r InitialTransferRequest) Respond(snapshotReader io.Reader) {
|
||||
@ -44,8 +45,9 @@ func (r InitialTransferRequest) Respond(snapshotReader io.Reader) {
|
||||
}
|
||||
|
||||
type IncrementalTransferRequest struct {
|
||||
FromSnapshot string
|
||||
ToSnapshot string
|
||||
Filesystem zfs.DatasetPath
|
||||
From zfs.FilesystemVersion
|
||||
To zfs.FilesystemVersion
|
||||
}
|
||||
|
||||
func (r IncrementalTransferRequest) Respond(snapshotReader io.Reader) {
|
||||
|
@ -10,14 +10,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func InitialSend(snapshot string) (io.Reader, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func IncrementalSend(from, to string) (io.Reader, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type DatasetPath []string
|
||||
|
||||
func (p DatasetPath) ToString() string {
|
||||
|
Loading…
Reference in New Issue
Block a user