Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRPCNotAvailable represents rpc service not available. ErrRPCNotAvailable = errors.New("rpc service not available") // ErrRPCTimeout represents rpc server timer out. ErrRPCTimeout = errors.New("rpc dial timeout") )
View Source
var ( // ErrRPCNoClientAvailable represents no client left in collection. ErrRPCNoClientAvailable = errors.New("no rpc client available now") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents rpc client
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
Clients represents rpc client collections.
func (*Clients) Call ¶
Call invokes the named function, waits for it to complete, and returns its error status.
func (*Clients) IsAvailable ¶
IsAvailable checks if exists a available client.
type KeepAlive ¶
type KeepAlive interface {
Ping(req *ReqKeepAlive, resp *RespKeepAlive) error
}
KeepAlive is general rpc ping interface.
Click to show internal directories.
Click to hide internal directories.