Documentation ¶
Index ¶
- Variables
- func Get(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func GetConnWithTracer(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func New(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func NewConnWithHashBalancer(endpoints []string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func NewConnWithTracer(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMaxRecvMsgSize = 1024 * 1024 * 4
DefaultMaxRecvMsgSize maximum message that client can receive (4 MB).
View Source
var DefaultMaxSendMsgSize = 1024 * 1024 * 4
DefaultMaxSendMsgSize maximum message that client can send (4 MB).
View Source
var DefaultTimeout = 3 * time.Second
DefaultTimeout 默认的连接超时时间
Functions ¶
func Get ¶
func Get(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Get new grpc client
func GetConnWithTracer ¶ added in v1.2.0
func GetConnWithTracer(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func New ¶
func New(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func NewConnWithHashBalancer ¶ added in v1.3.0
func NewConnWithHashBalancer(endpoints []string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func NewConnWithTracer ¶ added in v1.2.0
func NewConnWithTracer(service string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.