micro/server/rpc_receiver.go

22 lines
334 B
Go
Raw Normal View History

2015-01-14 02:31:27 +03:00
package server
2015-05-23 19:40:53 +03:00
type rpcReceiver struct {
2015-01-14 02:31:27 +03:00
name string
handler interface{}
}
2015-05-23 19:40:53 +03:00
func newRpcReceiver(name string, handler interface{}) Receiver {
return &rpcReceiver{
2015-01-14 02:31:27 +03:00
name: name,
handler: handler,
}
}
2015-05-23 19:40:53 +03:00
func (r *rpcReceiver) Name() string {
2015-01-14 02:31:27 +03:00
return r.name
}
2015-05-23 19:40:53 +03:00
func (r *rpcReceiver) Handler() interface{} {
2015-01-14 02:31:27 +03:00
return r.handler
}