client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AntClient

func AntClient() *ant.Client

AntClient returns the common inner ant client.

func EtcdClient

func EtcdClient() *etcd.Client

EtcdClient returns the common ETCD client.

func Init

func Init(cliCfg ant.CliConfig, protoFunc socket.ProtoFunc, etcdClient *etcd.Client)

Init initializes a common inner ant client.

func ProxyClient

func ProxyClient() plugin.Caller

ProxyClient returns the common proxy client.

func StaticClient

func StaticClient(srvAddr string) *ant.Client

StaticClient returns the client whose server address is srvAddr. If the client does not exist, set and return it.

Types

type StaticClients

type StaticClients struct {
	// contains filtered or unexported fields
}

StaticClients static clients map

func (*StaticClients) Get

func (s *StaticClients) Get(srvAddr string) (*ant.Client, bool)

Get returns the client whose server address is srvAddr.

func (*StaticClients) GetOrSet

func (s *StaticClients) GetOrSet(srvAddr string) *ant.Client

GetOrSet returns the client whose server address is srvAddr. If the client does not exist, set and return it.

func (*StaticClients) Set

func (s *StaticClients) Set(srvAddr string)

Set sets the client whose server address is srvAddr.

Jump to

Keyboard shortcuts

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