rpc/protocol/client_codec.go
crusader 96d9105d30 ing
2018-03-20 15:31:54 +09:00

23 lines
491 B
Go

package protocol
import (
"io"
)
// ClientCodec creates a ClientCodecRequest to process each request.
type ClientCodec interface {
WriteRequest(w io.Writer, method string, args []interface{}, id interface{}) error
NewResponse(rc io.Reader) (ClientResponseCodec, error)
}
type ClientResponseCodec interface {
Notification() (ClientNotificationCodec, error)
Result(result interface{}) error
Error() error
ID() interface{}
}
type ClientNotificationCodec interface {
RegistryCodec
}