mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 01:44:43 +01:00
31 lines
765 B
Go
31 lines
765 B
Go
package main
|
|
|
|
import (
|
|
"github.com/zrepl/zrepl/rpc"
|
|
"github.com/zrepl/zrepl/zfs"
|
|
"io"
|
|
)
|
|
|
|
type Handler struct {
|
|
PushMapping zfs.DatasetMapping
|
|
PullMapping zfs.DatasetMapping
|
|
}
|
|
|
|
func (h Handler) HandleFilesystemRequest(r rpc.FilesystemRequest) (roots []zfs.DatasetPath, err error) {
|
|
return
|
|
}
|
|
|
|
func (h Handler) HandleFilesystemVersionsRequest(r rpc.FilesystemVersionsRequest) (versions []zfs.FilesystemVersion, err error) {
|
|
return
|
|
}
|
|
|
|
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)
|
|
}
|