rpc/protocol/client_codec.go
crusader 08688dfb2f ing
2018-03-23 16:43:05 +09:00

25 lines
536 B
Go

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