Documentation
¶
Index ¶
- func Call(ctx context.Context, name string, method string, req Message, resp Message) (err error)
- func Client(name string) (r client.XClient)
- func NewRpcxClientPool(cfg *Cfg) (r *client.XClientPool, err error)
- func Pool(name string) (r *client.XClientPool)
- func SafeClient(name string) (r client.XClient, err error)
- func SafePool(name string) (r *client.XClientPool, err error)
- func Valid(names ...string) (err error)
- type Cfg
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRpcxClientPool ¶
func NewRpcxClientPool(cfg *Cfg) (r *client.XClientPool, err error)
func Pool ¶
func Pool(name string) (r *client.XClientPool)
Types ¶
type Cfg ¶
type Cfg struct { // dial DialAddrs []string `toml:"addrs"` DialServerName string `toml:"server_name"` // default `Server` DialDiscovery string `toml:"discovery"` DialFailMode string `toml:"fail_mode"` DialSelectMode string `toml:"select_mode"` DialConnectTimeout time.Duration `toml:"dial_timeout"` // discovery, only support zookeeper DiscoveryBasePath string `toml:"discovery_base_path"` // only discovery // pool PoolMaxActive int `toml:"pool_max_active"` // 最大活跃连接数 }
Click to show internal directories.
Click to hide internal directories.