Skip to content

Commit 1b5f863

Browse files
Google APIscopybara-github
authored andcommitted
feat: add PeerInfo proto in Bigtable API
PiperOrigin-RevId: 829585900
1 parent 178dbf3 commit 1b5f863

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

google/bigtable/v2/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ proto_library(
4444
"bigtable.proto",
4545
"data.proto",
4646
"feature_flags.proto",
47+
"peer_info.proto",
4748
"request_stats.proto",
4849
"response_params.proto",
4950
"types.proto",

google/bigtable/v2/bigtable_v2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apis:
88

99
types:
1010
- name: google.bigtable.v2.FeatureFlags
11+
- name: google.bigtable.v2.PeerInfo
1112
- name: google.bigtable.v2.ProtoRows
1213
- name: google.bigtable.v2.RequestStats
1314
- name: google.bigtable.v2.ResponseParams

google/bigtable/v2/feature_flags.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,7 @@ message FeatureFlags {
6767

6868
// Notify the server that the client explicitly opted in for Direct Access.
6969
bool direct_access_requested = 10;
70+
71+
// If the client can support using BigtablePeerInfo.
72+
bool peer_info = 11;
7073
}

google/bigtable/v2/peer_info.proto

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.bigtable.v2;
18+
19+
option csharp_namespace = "Google.Cloud.Bigtable.V2";
20+
option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb";
21+
option java_multiple_files = true;
22+
option java_outer_classname = "PeerInfoProto";
23+
option java_package = "com.google.bigtable.v2";
24+
option php_namespace = "Google\\Cloud\\Bigtable\\V2";
25+
option ruby_package = "Google::Cloud::Bigtable::V2";
26+
27+
// PeerInfo contains information about the peer that the client is
28+
// connecting to.
29+
message PeerInfo {
30+
// The transport type that the client used to connect to this peer.
31+
enum TransportType {
32+
// The transport type is unknown.
33+
TRANSPORT_TYPE_UNKNOWN = 0;
34+
35+
// The client connected to this peer via an external network
36+
// (e.g. outside Google Coud).
37+
TRANSPORT_TYPE_EXTERNAL = 1;
38+
39+
// The client connected to this peer via CloudPath.
40+
TRANSPORT_TYPE_CLOUD_PATH = 2;
41+
42+
// The client connected to this peer via DirectAccess.
43+
TRANSPORT_TYPE_DIRECT_ACCESS = 3;
44+
45+
// The client connected to this peer via Bigtable Sessions using an unknown
46+
// transport type.
47+
TRANSPORT_TYPE_SESSION_UNKNOWN = 4;
48+
49+
// The client connected to this peer via Bigtable Sessions on an external
50+
// network (e.g. outside Google Cloud).
51+
TRANSPORT_TYPE_SESSION_EXTERNAL = 5;
52+
53+
// The client connected to this peer via Bigtable Sessions using CloudPath.
54+
TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6;
55+
56+
// The client connected to this peer via Bigtable Sessions using
57+
// DirectAccess.
58+
TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7;
59+
}
60+
61+
// An opaque identifier for the Google Frontend which serviced this request.
62+
// Only set when not using DirectAccess.
63+
int64 google_frontend_id = 1;
64+
65+
// An opaque identifier for the application frontend which serviced this
66+
// request.
67+
int64 application_frontend_id = 2;
68+
69+
// The Cloud zone of the application frontend that served this request.
70+
string application_frontend_zone = 3;
71+
72+
// The subzone of the application frontend that served this request, e.g. an
73+
// identifier for where within the zone the application frontend is.
74+
string application_frontend_subzone = 4;
75+
76+
TransportType transport_type = 5;
77+
}

google/bigtable/v2/response_params.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ message ResponseParams {
3232
// Identifier for a cluster that represents set of
3333
// bigtable resources.
3434
optional string cluster_id = 2;
35+
36+
// The AFE ID for the AFE that is served this request.
37+
optional int64 afe_id = 3;
3538
}

0 commit comments

Comments
 (0)