zrepl/cmd/handler.go

28 lines
699 B
Go
Raw Normal View History

2017-04-26 20:21:18 +02:00
package main
import (
"github.com/zrepl/zrepl/rpc"
2017-04-26 20:25:53 +02:00
"github.com/zrepl/zrepl/zfs"
"io"
2017-04-26 20:21:18 +02:00
)
2017-04-26 20:25:53 +02:00
type Handler struct{}
2017-04-26 20:21:18 +02:00
func (h Handler) HandleFilesystemRequest(r rpc.FilesystemRequest) (roots []zfs.DatasetPath, err error) {
2017-04-26 20:21:18 +02:00
return
}
2017-05-03 17:12:15 +02:00
func (h Handler) HandleFilesystemVersionsRequest(r rpc.FilesystemVersionsRequest) (versions []zfs.FilesystemVersion, err error) {
return
2017-05-03 17:12:15 +02:00
}
2017-04-26 20:21:18 +02:00
func (h Handler) HandleInitialTransferRequest(r rpc.InitialTransferRequest) (io.Reader, error) {
// TODO ACL
return zfs.InitialSend(r.Snapshot)
}
func (h Handler) HandleIncrementalTransferRequest(r rpc.IncrementalTransferRequest) (io.Reader, error) {
// TODO ACL
return zfs.IncrementalSend(r.FromSnapshot, r.ToSnapshot)
}