rpc-go/protocol/client_codec.go

20 lines
540 B
Go
Raw Normal View History

2018-04-03 08:58:26 +00:00
package protocol
// ClientCodec creates a ClientCodecRequest to process each request.
type ClientCodec interface {
2018-06-30 16:37:26 +00:00
NewRequest(method string, args []interface{}, id interface{}) (messageType int, message []byte, err error)
NewResponse(messageType int, message []byte) (ClientResponseCodec, error)
2018-04-03 08:58:26 +00:00
}
type ClientResponseCodec interface {
2018-06-01 08:03:44 +00:00
IsNotification() bool
2018-04-03 08:58:26 +00:00
Notification() (ClientNotificationCodec, error)
Result(result interface{}) error
Error() *Error
ID() interface{}
}
type ClientNotificationCodec interface {
RegistryCodec
}