GRPC C++  1.39.1
xds_http_fault_filter.h
Go to the documentation of this file.
1 //
2 // Copyright 2021 gRPC authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef GRPC_CORE_EXT_XDS_XDS_HTTP_FAULT_FILTER_H
18 #define GRPC_CORE_EXT_XDS_XDS_HTTP_FAULT_FILTER_H
19 
21 
22 #include <grpc/grpc.h>
23 
24 #include "absl/status/statusor.h"
26 #include "upb/def.h"
27 
28 namespace grpc_core {
29 
30 extern const char* kXdsHttpFaultFilterConfigName;
31 
33  public:
34  // Overrides the PopulateSymtab method
35  void PopulateSymtab(upb_symtab* symtab) const override;
36 
37  // Overrides the GenerateFilterConfig method
38  absl::StatusOr<FilterConfig> GenerateFilterConfig(
39  upb_strview serialized_filter_config, upb_arena* arena) const override;
40 
41  // Overrides the GenerateFilterConfigOverride method
42  absl::StatusOr<FilterConfig> GenerateFilterConfigOverride(
43  upb_strview serialized_filter_config, upb_arena* arena) const override;
44 
45  // Overrides the channel_filter method
46  const grpc_channel_filter* channel_filter() const override;
47 
48  // Overrides the ModifyChannelArgs method
50 
51  // Overrides the GenerateServiceConfig method
52  absl::StatusOr<ServiceConfigJsonEntry> GenerateServiceConfig(
53  const FilterConfig& hcm_filter_config,
54  const FilterConfig* filter_config_override) const override;
55 
56  bool IsSupportedOnClients() const override { return true; }
57 
58  bool IsSupportedOnServers() const override { return false; }
59 };
60 
61 } // namespace grpc_core
62 
63 #endif /* GRPC_CORE_EXT_XDS_XDS_HTTP_FAULT_FILTER_H */
Definition: xds_http_fault_filter.h:32
void PopulateSymtab(upb_symtab *symtab) const override
Definition: xds_http_fault_filter.cc:176
const grpc_channel_filter * channel_filter() const override
Definition: xds_http_fault_filter.cc:199
absl::StatusOr< FilterConfig > GenerateFilterConfig(upb_strview serialized_filter_config, upb_arena *arena) const override
Definition: xds_http_fault_filter.cc:181
grpc_channel_args * ModifyChannelArgs(grpc_channel_args *args) const override
Definition: xds_http_fault_filter.cc:203
absl::StatusOr< ServiceConfigJsonEntry > GenerateServiceConfig(const FilterConfig &hcm_filter_config, const FilterConfig *filter_config_override) const override
Definition: xds_http_fault_filter.cc:216
bool IsSupportedOnClients() const override
Definition: xds_http_fault_filter.h:56
bool IsSupportedOnServers() const override
Definition: xds_http_fault_filter.h:58
absl::StatusOr< FilterConfig > GenerateFilterConfigOverride(upb_strview serialized_filter_config, upb_arena *arena) const override
Definition: xds_http_fault_filter.cc:192
Definition: xds_http_filters.h:41
Round Robin Policy.
Definition: backend_metric.cc:26
const char * kXdsHttpFaultFilterConfigName
Definition: xds_http_fault_filter.cc:47
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: channel_stack.h:107
Definition: xds_http_filters.h:43
upb_arena * arena
Definition: xds_api.cc:909
upb_symtab * symtab
Definition: xds_api.cc:908