GRPC C++  1.39.1
endpoint_config.h
Go to the documentation of this file.
1 // Copyright 2021 The gRPC Authors
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 #ifndef GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
15 #define GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
16 
18 
19 #include <string>
20 
21 #include "absl/strings/string_view.h"
22 #include "absl/types/variant.h"
23 
24 namespace grpc_event_engine {
25 namespace experimental {
26 
36  public:
37  virtual ~EndpointConfig() = default;
38  using Setting = absl::variant<absl::monostate, int, absl::string_view, void*>;
42  virtual Setting Get(absl::string_view key) const = 0;
43 };
44 
45 } // namespace experimental
46 } // namespace grpc_event_engine
47 
48 #endif // GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
A set of parameters used to configure an endpoint, either when initiating a new connection on the cli...
Definition: endpoint_config.h:35
absl::variant< absl::monostate, int, absl::string_view, void * > Setting
Definition: endpoint_config.h:38
virtual Setting Get(absl::string_view key) const =0
Returns an EndpointConfig Setting.
Definition: endpoint_config.h:24