-
Notifications
You must be signed in to change notification settings - Fork 439
Description
Deprecate these options:
google-cloud-cpp/google/cloud/bigtable/options.h
Lines 54 to 73 in 7b535ee
| /// The endpoint for data operations. | |
| struct DataEndpointOption { | |
| using Type = std::string; | |
| }; | |
| /// The endpoint for table admin operations. | |
| struct AdminEndpointOption { | |
| using Type = std::string; | |
| }; | |
| /** | |
| * The endpoint for instance admin operations. | |
| * | |
| * In most scenarios this should have the same value as `AdminEndpointOption`. | |
| * The most common exception is testing, where the emulator for instance admin | |
| * operations may be different than the emulator for admin and data operations. | |
| */ | |
| struct InstanceAdminEndpointOption { | |
| using Type = std::string; | |
| }; |
We do not need them. The endpoint should be configured using EndpointOption like all other libraries do.
We will still need to have internal versions of these options. These will be set by ClientOptions and respected by DataClient, AdminClient, InstanceAdminClient to maintain backwards compatibility. They just do not need to be public.
Also, it would be nice to clean up the logic around defaulting. Namely: the logic in bigtable_internal::DefaultOptions() is mostly unnecessary. Aside from the endpoint it sets some fields needed only for the Data API, and does the same work as the generated function to default options for the Admin APIs. The one difference is that the Instance Admin has 2 emulator environment variables. That is annoying, but still there is a simpler way to write the code.