Documentation ¶
Index ¶
- Variables
- type Call
- type CallManager
- func (client *CallManager) Call(serviceMethod string, args interface{}, reply interface{}) error
- func (client *CallManager) Go(serviceMethod string, args interface{}, reply interface{}, done chan *Call) *Call
- func (client *CallManager) Notify(serviceMethod string, args interface{}, reply interface{}) error
- type Client
- type Codec
- type DecodeReader
- type Decoder
- type Encoder
- type Header
- type ServerError
- type ServiceManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrShutdown = errors.New("connection is shut down")
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct { ServiceMethod string // The name of the service and method to call. Args interface{} // The argument to the function (*struct). Reply interface{} // The reply from the function (*struct). Error error // After completion, the error status. Done chan *Call // Strobes when call is complete. IsNotify bool }
type CallManager ¶
type CallManager struct {
// contains filtered or unexported fields
}
func NewCallManager ¶
func NewCallManager(codec Codec) *CallManager
func (*CallManager) Call ¶
func (client *CallManager) Call(serviceMethod string, args interface{}, reply interface{}) error
func (*CallManager) Go ¶
func (client *CallManager) Go(serviceMethod string, args interface{}, reply interface{}, done chan *Call) *Call
func (*CallManager) Notify ¶
func (client *CallManager) Notify(serviceMethod string, args interface{}, reply interface{}) error
type Client ¶
type Client struct { CallManager // contains filtered or unexported fields }
func NewClient ¶
func NewClient(conn io.ReadWriteCloser) *Client
func NewClientWithCodec ¶
func (*Client) SetServer ¶
func (client *Client) SetServer(server *ServiceManager)
type Codec ¶
type Codec interface { Write(*Header, interface{}) error ReadHeader(*Header) error ReadBody(interface{}) error Close() error }
func NewProtobufCodec ¶
func NewProtobufCodec(rwc io.ReadWriteCloser) Codec
type DecodeReader ¶
type DecodeReader interface { io.ByteReader io.Reader }
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder manages the receipt of type and data information read from the remote side of a connection.
func NewDecoder ¶
func NewDecoder(r DecodeReader) *Decoder
NewDecoder returns a new decoder that reads from the io.Reader.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder manages the transmission of type and data information to the other side of a connection.
func NewEncoder ¶
NewEncoder returns a new encoder that will transmit on the io.Writer.
type ServerError ¶
type ServerError string
func (ServerError) Error ¶
func (e ServerError) Error() string
type ServiceManager ¶
type ServiceManager struct {
// contains filtered or unexported fields
}
func NewServiceManager ¶
func NewServiceManager() *ServiceManager
func (*ServiceManager) Register ¶
func (server *ServiceManager) Register(rcvr interface{}) error
func (*ServiceManager) RegisterName ¶
func (server *ServiceManager) RegisterName(name string, rcvr interface{}) error
Click to show internal directories.
Click to hide internal directories.