2017-09-10 16:13:05 +02:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"github.com/zrepl/zrepl/rpc"
|
|
|
|
"github.com/zrepl/zrepl/zfs"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Config struct {
|
2017-09-11 13:43:18 +02:00
|
|
|
Global Global
|
|
|
|
Jobs map[string]Job
|
|
|
|
}
|
|
|
|
|
|
|
|
type Global struct {
|
|
|
|
Serve struct {
|
|
|
|
Stdinserver struct {
|
|
|
|
SockDir string
|
|
|
|
}
|
|
|
|
}
|
2017-09-10 16:13:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type RPCConnecter interface {
|
|
|
|
Connect() (rpc.RPCClient, error)
|
|
|
|
}
|
|
|
|
type AuthenticatedChannelListenerFactory interface {
|
2017-09-11 13:48:07 +02:00
|
|
|
Listen() (AuthenticatedChannelListener, error)
|
2017-09-10 16:13:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type AuthenticatedChannelListener interface {
|
|
|
|
Accept() (ch io.ReadWriteCloser, err error)
|
2017-09-11 13:48:07 +02:00
|
|
|
Close() (err error)
|
2017-09-10 16:13:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type SSHStdinServerConnectDescr struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type PrunePolicy interface {
|
|
|
|
Prune(fs zfs.DatasetPath, versions []zfs.FilesystemVersion) (keep, remote []zfs.FilesystemVersion, err error)
|
|
|
|
}
|