client

package
v0.0.0-...-e121adf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

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) Close

func (c *PersistentRpcClient) Close()

Tear down the RPC client

func (*PersistentRpcClient) Connect

func (c *PersistentRpcClient) Connect() error

func (*PersistentRpcClient) Reconnect

func (c *PersistentRpcClient) Reconnect(maxretries int) error

Reconnect logic

type RpcClient

type RpcClient interface {
	Call(serviceMethod string, args interface{}, reply interface{}) error
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL