-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathfeature.go
More file actions
73 lines (66 loc) · 3.08 KB
/
Copy pathfeature.go
File metadata and controls
73 lines (66 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package gengapic
// We use a custom type for feature ID to clarify that features are setup explicitly.
type featureID string
// featureInfo contains basic information about features, and provides an extensible mechanism
// for adding more infomation down the line (maturity level, warning about stale experiments, etc)
type featureInfo struct {
// Short summary of feature.
Description string
// Tracking ID for more information. Github issue, internal b/ issue, etc.
TrackingID string
}
// Define feature ID strings here. More details about features are kept in the featureRegistry map.
const (
DynamicResourceHeuristicsFeature featureID = "dynamic_resource_heuristics"
ExportSetGoogleClientInfoFeature featureID = "export_set_google_client_info"
MTLSHardBoundTokensFeature featureID = "mtls_hard_bound_tokens"
OpenTelemetryAttributesFeature featureID = "open_telemetry_attributes"
OrderedRoutingHeadersFeature featureID = "ordered_routing_headers"
SelectiveGapicGenerationFeature featureID = "selective_gapic_generation"
WrapperTypesForPageSizeFeature featureID = "wrapper_types_for_page_size"
)
// featureRegistry contains the registry of defined features.
// Introducing a new capability to the generator generally starts here, as features
// must be registered to be enabled. This should not be modified at runtime. Those
// who attempt to do so will be given a stern talking to.
var featureRegistry = map[featureID]*featureInfo{
DynamicResourceHeuristicsFeature: {
Description: "Enable dynamic resource name heuristics for unannotated legacy services.",
TrackingID: "b/476980139",
},
ExportSetGoogleClientInfoFeature: {
Description: "Generated exported SetGoogleClientInfo function in client",
TrackingID: "b/489495186",
},
MTLSHardBoundTokensFeature: {
Description: "support MTLS hard bound tokens",
TrackingID: "b/327916505",
},
OpenTelemetryAttributesFeature: {
Description: "Enable OpenTelemetry attributes support (Service Identity, Resource Names, URL Templates).",
TrackingID: "b/467342602,b/467403185",
},
OrderedRoutingHeadersFeature: {
Description: "Specify that routing headers are emitted in a deterministic fashion. Primarily used for firestore.",
},
SelectiveGapicGenerationFeature: {
Description: "Enable selective GAPIC generation, reducing public surface area based on config.",
},
WrapperTypesForPageSizeFeature: {
Description: "Allow List RPCs to generator with support for protobuf wrapper types (e.g. Int32Value, etc).",
TrackingID: "b/352331075",
},
}