grpc

package
v0.0.0-...-61e4c6b Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePoll

func CreatePoll(config *ServiceGrpcPoolConfig, opts ...grpc.DialOption) (pool.Pool, error)

func LoadServicePool

func LoadServicePool(serviceName string) (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

Jump to

Keyboard shortcuts

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