grpc

package
v0.0.0-...-809eaf0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcClient

type GrpcClient struct {
	Config *GrpcClientConfig
	Conn   *grpc.ClientConn
}

func InitGrpcClient

func InitGrpcClient(cc *GrpcClientConfig) (*GrpcClient, error)

type GrpcClientConfig

type GrpcClientConfig struct {
	Host           string        `yaml:"host"`
	Port           string        `yaml:"grpc"`
	ConnectTimeout time.Duration `yaml:"connect_timeout"` // 链接超时时间(单位:秒)
	RequestTimeout time.Duration `yaml:"request_timeout"` // 请求超时时间(单位:秒)
}

Jump to

Keyboard shortcuts

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