mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-23 07:28:57 +01:00
main: remove global handler and unused structs
This commit is contained in:
parent
f005ce318d
commit
77f749112c
@ -6,7 +6,10 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Handler struct{}
|
type Handler struct {
|
||||||
|
PushMapping zfs.DatasetMapping
|
||||||
|
PullMapping zfs.DatasetMapping
|
||||||
|
}
|
||||||
|
|
||||||
func (h Handler) HandleFilesystemRequest(r rpc.FilesystemRequest) (roots []zfs.DatasetPath, err error) {
|
func (h Handler) HandleFilesystemRequest(r rpc.FilesystemRequest) (roots []zfs.DatasetPath, err error) {
|
||||||
return
|
return
|
||||||
|
20
cmd/main.go
20
cmd/main.go
@ -5,22 +5,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"github.com/zrepl/zrepl/jobrun"
|
"github.com/zrepl/zrepl/jobrun"
|
||||||
"github.com/zrepl/zrepl/rpc"
|
|
||||||
"github.com/zrepl/zrepl/sshbytestream"
|
|
||||||
"io"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Role uint
|
|
||||||
|
|
||||||
const (
|
|
||||||
ROLE_IPC Role = iota
|
|
||||||
ROLE_ACTION Role = iota
|
|
||||||
)
|
|
||||||
|
|
||||||
var conf Config
|
var conf Config
|
||||||
var handler Handler
|
|
||||||
var runner *jobrun.JobRunner
|
var runner *jobrun.JobRunner
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -40,7 +29,6 @@ func main() {
|
|||||||
if conf, err = ParseConfig(c.GlobalString("config")); err != nil {
|
if conf, err = ParseConfig(c.GlobalString("config")); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
handler = Handler{}
|
|
||||||
|
|
||||||
runner = jobrun.NewJobRunner()
|
runner = jobrun.NewJobRunner()
|
||||||
return
|
return
|
||||||
@ -68,13 +56,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func doSink(c *cli.Context) (err error) {
|
func doSink(c *cli.Context) (err error) {
|
||||||
|
return
|
||||||
var sshByteStream io.ReadWriteCloser
|
|
||||||
if sshByteStream, err = sshbytestream.Incoming(); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
return rpc.ListenByteStreamRPC(sshByteStream, handler)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func doRun(c *cli.Context) error {
|
func doRun(c *cli.Context) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user