Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxRetries = 3
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PersistentRpcClient ¶
type PersistentRpcClient struct { Addr string // server address to connect to // contains filtered or unexported fields }
func NewPersistentRpcClient ¶
func NewPersistentRpcClient(addr string) *PersistentRpcClient
Creates an RPC client that connects to addr.
func (*PersistentRpcClient) Call ¶
func (c *PersistentRpcClient) Call(serviceMethod string, args interface{}, reply interface{}) error
func (*PersistentRpcClient) Connect ¶
func (c *PersistentRpcClient) Connect() error
func (*PersistentRpcClient) Reconnect ¶
func (c *PersistentRpcClient) Reconnect(maxretries int) error
Reconnect logic
type SimpleRpcClient ¶
type SimpleRpcClient struct {
Addr string // server address to connect to
}
func NewSimpleRpcClient ¶
func NewSimpleRpcClient(addr string) *SimpleRpcClient
func (*SimpleRpcClient) Call ¶
func (c *SimpleRpcClient) Call(serviceMethod string, args interface{}, reply interface{}) error
Click to show internal directories.
Click to hide internal directories.