dialEmulator opens a gRPC connection to the GCP Pub Sub API.
(ctx context.Context, e string)
| 302 | |
| 303 | // dialEmulator opens a gRPC connection to the GCP Pub Sub API. |
| 304 | func 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. |
no test coverage detected