19 lines
466 B
Go
19 lines
466 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
|
|
}
|