MCPcopy Create free account
hub / github.com/google/go-cloud / dialEmulator

Function dialEmulator

pubsub/gcppubsubv2/gcppubsub.go:304–312  ·  view source on GitHub ↗

dialEmulator opens a gRPC connection to the GCP Pub Sub API.

(ctx context.Context, e string)

Source from the content-addressed store, hash-verified

302
303// dialEmulator opens a gRPC connection to the GCP Pub Sub API.
304func dialEmulator(ctx context.Context, e string) (*grpc.ClientConn, error) {
305 conn, err := grpc.DialContext(ctx, e,
306 grpc.WithTransportCredentials(insecure.NewCredentials()),
307 useragent.GRPCDialOption("pubsub"))
308 if err != nil {
309 return nil, err
310 }
311 return conn, nil
312}
313
314// Client returns a *raw.Client that can be used in OpenTopic and/or OpenSubscription.
315// conn is optional.

Callers 1

defaultConnMethod · 0.70

Calls 1

GRPCDialOptionFunction · 0.92

Tested by

no test coverage detected