Documentation ¶
Index ¶
- func Call(ctx context.Context, name string, method string, req proto.Message, ...) (err error)
- func Client(name string) (r client.XClient)
- func NewRpcxClientPool(name string, 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRpcxClientPool ¶
func NewRpcxClientPool(name string, 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"` DialDiscovery string `toml:"discovery"` DialFailMode string `toml:"fail_mode"` DialSelectMode string `toml:"select_mode"` DialConnectTimeout time.Duration `toml:"dial_timeout"` // zookeeper register DiscoveryZkBasePath string `toml:"discovery_zk_basepath"` // nacos register RegisterNcNamespaceId string `toml:"register_nc_namespace_id"` RegisterNcCacheDir string `toml:"register_nc_cache_dir"` RegisterNcLogDir string `toml:"register_nc_log_dir"` RegisterNcLogLevel string `toml:"register_nc_log_level"` RegisterNcAccessKey string `toml:"register_nc_access_key"` RegisterNcSecretKey string `toml:"register_nc_secret_key"` // pool PoolMaxActive int `toml:"pool_max_active"` // 最大活跃连接数 }
Click to show internal directories.
Click to hide internal directories.