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)
| 314 | // Client returns a *raw.Client that can be used in OpenTopic and/or OpenSubscription. |
| 315 | // conn is optional. |
| 316 | func 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. |
| 324 | type TopicOptions struct { |