mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-22 15:11:16 +01:00
rpc: remove FilesystemRequest.Direction (unused)
This commit is contained in:
parent
40fe7e643d
commit
3c7f782dac
@ -14,17 +14,9 @@ type Handler struct {
|
||||
|
||||
func (h Handler) HandleFilesystemRequest(r rpc.FilesystemRequest) (roots []zfs.DatasetPath, err error) {
|
||||
|
||||
var mapping zfs.DatasetMapping
|
||||
switch r.Direction {
|
||||
case rpc.DirectionPush:
|
||||
mapping = h.PushMapping
|
||||
case rpc.DirectionPull:
|
||||
mapping = h.PullMapping
|
||||
}
|
||||
|
||||
h.Logger.Printf("handling fsr: %#v", r)
|
||||
|
||||
if roots, err = zfs.ZFSListMapping(mapping); err != nil {
|
||||
if roots, err = zfs.ZFSListMapping(h.PullMapping); err != nil {
|
||||
h.Logger.Printf("handle fsr err: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
@ -46,9 +46,7 @@ func doPull(pull PullContext) (err error) {
|
||||
remote := pull.Remote
|
||||
log := pull.Log
|
||||
|
||||
fsr := rpc.FilesystemRequest{
|
||||
Direction: rpc.DirectionPull,
|
||||
}
|
||||
fsr := rpc.FilesystemRequest{}
|
||||
var remoteFilesystems []zfs.DatasetPath
|
||||
if remoteFilesystems, err = remote.FilesystemRequest(fsr); err != nil {
|
||||
return
|
||||
|
@ -20,16 +20,8 @@ type RequestHeader struct {
|
||||
Id [16]byte // UUID
|
||||
}
|
||||
|
||||
type Direction string
|
||||
|
||||
const (
|
||||
DirectionPush Direction = "push"
|
||||
DirectionPull Direction = "pull"
|
||||
)
|
||||
|
||||
type FilesystemRequest struct {
|
||||
Roots []string // may be nil, indicating interest in all filesystems
|
||||
Direction Direction
|
||||
Roots []string // may be nil, indicating interest in all filesystems
|
||||
}
|
||||
|
||||
type FilesystemVersionsRequest struct {
|
||||
|
Loading…
Reference in New Issue
Block a user