Documentation ¶
Index ¶
Constants ¶
View Source
const ( BuffSizeReader = 64 * 1024 //64K ReadTimeout = 5 * time.Second )
View Source
const ( SelectTypeRandom selectType = iota SelectTypeWeightedRandom SelectTypeRoundRobin SelectTypeSpecified )
Variables ¶
View Source
var ErrBeClosed = errors.New("connection closed by peer")
View Source
var ErrNetClosing = errors.New("use of closed network connection")
View Source
var ErrShutdown = errors.New("shut down")
Functions ¶
func WithSelectType ¶
func WithSelectType(styp selectType) fnOptionService
func WithVersion ¶
func WithVersion(version string) fnOptionService
func WithVersionAll ¶
func WithVersionAll() fnOptionService
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. Seq uint16 // contains filtered or unexported fields }
Call represents an active RPC.
type FnCallback ¶
type FnCallback func(a interface{}, r interface{}, e error)
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.