rpc-go/protocol/client_codec.go
crusader 32883be22b ing
2018-07-01 01:37:26 +09:00

20 lines
540 B
Go

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