grpc
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package grpc supports network connections to GRPC servers.This package is not intended for use by end developers. Use thegoogle.golang.org/api/option package to configure API clients.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcDial¶
func Dial(ctxcontext.Context, opts ...option.ClientOption) (*grpc.ClientConn,error)
Dial returns a GRPC connection for use communicating with a Google cloudservice, configured with the given ClientOptions.
funcDialInsecure¶
func DialInsecure(ctxcontext.Context, opts ...option.ClientOption) (*grpc.ClientConn,error)
DialInsecure returns an insecure GRPC connection for use communicatingwith fake or mock Google cloud service implementations, such as emulators.The connection is configured with the given ClientOptions.
funcWithConnPool¶added inv0.17.0
func WithConnPool(pConnPool)option.ClientOption
WithConnPool returns a ClientOption that specifies the ConnPoolconnection to use as the basis of communications.
This is only to be used by Google client libraries internally, for examplewhen creating a longrunning API client that shares the same connection poolas a service client.
Types¶
typeConnPool¶added inv0.16.0
type ConnPool =internal.ConnPool// NOTE(cbro): type alias to export the type. It must live in internal to avoid a circular dependency.
ConnPool is a pool of grpc.ClientConns.
funcDialPool¶added inv0.16.0
DialPool returns a pool of GRPC connections for the given service.This differs from the connection pooling implementation used by Dial, which uses a custom GRPC load balancer.DialPool should be used instead of Dial when a pool is used by default or a different custom GRPC load balancer is needed.The context and options are shared between each Conn in the pool.The pool size is configured using the WithGRPCConnectionPool option.
This API is subject to change as we further refine requirements. It will go away if gRPC stubs accept an interface instead of the concrete ClientConn type. Seehttps://github.com/grpc/grpc-go/issues/1287.