Files
zrepl_patched/cmd/config_serve.go
T
Christian Schwarz 73c9033583 WIP: Switch to new config format.
Don't use jobrun for daemon, just call JobDo() once, the job must
organize stuff itself.

Sacrifice all the oneshot commands, they will be reintroduced as
client-calls to the daemon.
2017-09-10 17:53:54 +02:00

28 lines
617 B
Go

package cmd
import "github.com/pkg/errors"
type StdinserverListenerFactory struct {
ClientIdentity string
}
func (StdinserverListenerFactory) Listen() AuthenticatedChannelListener {
panic("implement me")
}
func parseStdinserverListenerFactory(i map[string]interface{}) (f *StdinserverListenerFactory, err error) {
ci, ok := i["client_identity"]
if !ok {
err = errors.Errorf("must specify 'client_identity'")
return
}
cs, ok := ci.(string)
if !ok {
err = errors.Errorf("must specify 'client_identity' as string, got %T", cs)
return
}
f = &StdinserverListenerFactory{ClientIdentity: cs}
return
}