rpc-go/protocol/client_codec.go
crusader dcc3af0723 ing
2018-06-01 17:03:44 +09:00

20 lines
490 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 {
IsNotification() bool
Notification() (ClientNotificationCodec, error)
Result(result interface{}) error
Error() *Error
ID() interface{}
}
type ClientNotificationCodec interface {
RegistryCodec
}