Beispiel #1
0
// Register calls the Registrar's Register method.
//
// This function exists for backwards compatibility only. It will be removed
// in a future version.
//
// Deprecated: Use the Registrar's Register method directly.
func Register(r transport.Registrar, rs []transport.Registrant) {
	r.Register(rs)
}
Beispiel #2
0
func register(reg transport.Registrar) {
	reg.Register(raw.Procedure("echo/raw", EchoRaw))
	reg.Register(json.Procedure("echo", EchoJSON))

	reg.Register(echoserver.New(EchoThrift{}))
	reg.Register(thrifttestserver.New(thriftTest{}))
	reg.Register(secondserviceserver.New(secondService{}))

	reg.Register(json.Procedure("unexpected-error", UnexpectedError))
	reg.Register(json.Procedure("bad-response", BadResponse))
	reg.Register(json.Procedure("phone", Phone))
	reg.Register(json.Procedure("sleep", Sleep))

	reg.Register(raw.Procedure("sleep/raw", SleepRaw))
	reg.Register(raw.Procedure("waitfortimeout/raw", WaitForTimeoutRaw))
}