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

Function Client

pubsub/gcppubsubv2/gcppubsub.go:316–321  ·  view source on GitHub ↗

Client returns a *raw.Client that can be used in OpenTopic and/or OpenSubscription. conn is optional.

(ctx context.Context, projectID gcp.ProjectID, conn *grpc.ClientConn)

Source from the content-addressed store, hash-verified

314// Client returns a *raw.Client that can be used in OpenTopic and/or OpenSubscription.
315// conn is optional.
316func Client(ctx context.Context, projectID gcp.ProjectID, conn *grpc.ClientConn) (*raw.Client, error) {
317 if conn == nil {
318 return raw.NewClient(ctx, string(projectID))
319 }
320 return raw.NewClient(ctx, string(projectID), option.WithGRPCConn(conn))
321}
322
323// TopicOptions will contain configuration for topics.
324type TopicOptions struct {

Callers 8

ExampleOpenTopicFunction · 0.92
ExampleOpenSubscriptionFunction · 0.92
newHarnessFunction · 0.85
BenchmarkGcpPubSubFunction · 0.85
TestOpenTopicFunction · 0.85
TestOpenSubscriptionFunction · 0.85
OpenTopicURLMethod · 0.85
OpenSubscriptionURLMethod · 0.85

Calls 1

NewClientMethod · 0.80

Tested by 6

ExampleOpenTopicFunction · 0.74
ExampleOpenSubscriptionFunction · 0.74
newHarnessFunction · 0.68
BenchmarkGcpPubSubFunction · 0.68
TestOpenTopicFunction · 0.68
TestOpenSubscriptionFunction · 0.68