-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(bigquery/storage/managedwriter): add base client #4422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bigquery/storage/managedwriter): add base client #4422
Conversation
This PR adds a base client and implements some of the surface. All the streaming client abstractions are elided and will be introduced in subsequent PRs, but this PR does include non-streaming RPC methods Alongside the client, we introduce an option type (WriterOption) for constructing a client in a variadic fashion. The client contains an internal settings type, streamSettings, which contains fields of note for both the streaming client abstraction and its flow controller. Testing: This PR contains unit tests, but doesn't include integration tests. I'll start hoisting that in soon.
} | ||
|
||
// NewManagedStream establishes a new stream for writing. | ||
func (c *Client) NewManagedStream(ctx context.Context, table *bigquery.Table, opts ...WriterOption) (*ManagedStream, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think table could just be datasetID and tableID. I worry about this client reaching for code in both directions up and down the file structure. This means the core bigquery package could never rely on this package due to cycles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine switching it to string, now I'm wondering if it should be a variadic argument. We don't do anything with the reference other than for the construct a stream case, but if we allow users to pass in an optional stream ID perhaps we let them treat table as optional as well? Will switch it and augment the validation (your other comment) and see how it plays.
This PR adds a base client and managed stream abstraction, and
implements some of the associated surfaces. All the
streaming client abstractions are elided and will be introduced in
subsequent PRs, but this PR does include non-streaming RPC methods
Alongside the client, we introduce an option type (WriterOption) for
constructing a client in a variadic fashion.
The client contains an internal settings type, streamSettings, which
contains fields of note for both the streaming client abstraction and
its flow controller.
Testing: This PR contains unit tests, but doesn't include integration
tests. I'll start hoisting that in soon.
Towards: #4366