dialEmulator opens a gRPC connection to the GCP Pub Sub API.
(ctx context.Context, e string)
| 308 | |
| 309 | // dialEmulator opens a gRPC connection to the GCP Pub Sub API. |
| 310 | func dialEmulator(ctx context.Context, e string) (*grpc.ClientConn, error) { |
| 311 | conn, err := grpc.DialContext(ctx, e, |
| 312 | grpc.WithTransportCredentials(insecure.NewCredentials()), |
| 313 | useragent.GRPCDialOption("pubsub")) |
| 314 | if err != nil { |
| 315 | return nil, err |
| 316 | } |
| 317 | return conn, nil |
| 318 | } |
| 319 | |
| 320 | // PublisherClient returns a *raw.PublisherClient that can be used in OpenTopic. |
| 321 | func PublisherClient(ctx context.Context, conn *grpc.ClientConn) (*raw.PublisherClient, error) { |
no test coverage detected