Example #1
0
func doRun() error {
	svc, err := revrpc.GetDefaultServiceFromEnv("demo")
	if err != nil {
		return err
	}
	return revrpc.BabysitService(rpcSetup, svc, nil)
}
Example #2
0
func init() {
	rpcsvc, err := revrpc.GetDefaultServiceFromEnv("cbauth")
	if err != nil {
		ErrNotInitialized = fmt.Errorf("Unable to initialize cbauth's revrpc: %s", err)
		return
	}
	startDefault(rpcsvc)
}
Example #3
0
func doRunPort() error {
	svc, err := revrpc.GetDefaultServiceFromEnv("saslauthd-port")
	if err != nil {
		return err
	}
	go runStdinWatcher()
	return revrpc.BabysitService(setupPortRPC, svc, nil)
}
Example #4
0
func RegisterServiceManager(mgr ServiceManager,
	errorPolicy revrpc.BabysitErrorPolicy) error {

	service, err := revrpc.GetDefaultServiceFromEnv("service_api")
	if err != nil {
		return err
	}

	setup := func(rpc *rpc.Server) error {
		return rpc.Register(&ServiceAPI{mgr})
	}

	return revrpc.BabysitService(setup, service, errorPolicy)
}