rpc-go/protocol/client_codec.go
crusader 8587e2e369 ing
2018-04-03 17:58:26 +09:00

19 lines
467 B
Go

package protocol
// ClientCodec creates a ClientCodecRequest to process each request.
type ClientCodec interface {
NewRequest(method string, args []interface{}, id interface{}) ([]byte, error)
NewResponse(buf []byte) (ClientResponseCodec, error)
}
type ClientResponseCodec interface {
Notification() (ClientNotificationCodec, error)
Result(result interface{}) error
Error() *Error
ID() interface{}
}
type ClientNotificationCodec interface {
RegistryCodec
}