Option for google::cloud::Options to indicate which replicas or regions should be used for reads/queries in read-only or single-use transactions.
Use of DirectedReadOptions within a read-write transaction will result in a kInvalidArgument error.
The IncludeReplicas variant lists the replicas to try (in order) to process the request, and what to do if the list is exhausted without finding a healthy replica.
Alternately, the ExcludeReplicas variant lists replicas that should be excluded from serving the request.
Type Aliases
Type
Alias Of: absl::variant< absl::monostate, IncludeReplicas, ExcludeReplicas >
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-14 UTC."],[[["This webpage provides documentation for the `DirectedReadOption` in the Google Cloud Spanner C++ client library, covering versions from 2.11.0 up to the latest release candidate 2.37.0-rc."],["`DirectedReadOption` allows specifying which replicas or regions should be used for reads or queries in read-only or single-use transactions, and it cannot be used in read-write transactions."],["The functionality includes the ability to explicitly include replicas with the `IncludeReplicas` variant, listing the replicas in order of preference, or exclude replicas with the `ExcludeReplicas` variant."],["The `DirectedReadOption` type is an alias for `absl::variant\u003c absl::monostate, IncludeReplicas, ExcludeReplicas \u003e`, offering flexibility in how replica preferences are specified."]]],[]]