Documentation ¶
Index ¶
- func CreatePoll(config *ServiceGrpcPoolConfig, opts ...grpc.DialOption) (pool.Pool, error)
- func LoadServicePool(serviceName string) (pool.Pool, error)
- func WithClientInterceptor() grpc.DialOption
- func WithKeepaliveParams() grpc.DialOption
- func WithStreamInterceptor() grpc.DialOption
- type ConfigItem
- type ServiceGrpcPoolConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePoll ¶
func CreatePoll(config *ServiceGrpcPoolConfig, opts ...grpc.DialOption) (pool.Pool, error)
func WithClientInterceptor ¶
func WithClientInterceptor() grpc.DialOption
func WithKeepaliveParams ¶
func WithKeepaliveParams() grpc.DialOption
func WithStreamInterceptor ¶
func WithStreamInterceptor() grpc.DialOption
Types ¶
type ConfigItem ¶
type ConfigItem struct { Name string `json:"name"` Address string `json:"address"` Init int `json:"init"` Idle int `json:"idle"` Capacity int `json:"capacity"` }
func GetGrpcHostByServiceName ¶
func GetGrpcHostByServiceName(name string) *ConfigItem
type ServiceGrpcPoolConfig ¶
type ServiceGrpcPoolConfig struct {
// contains filtered or unexported fields
}
func NewServiceGrpcConfig ¶
func NewServiceGrpcConfig(name, address string, idleTime time.Duration, init, idle, capacity int) *ServiceGrpcPoolConfig
Click to show internal directories.
Click to hide internal directories.