/src/trafficserver/include/proxy/http3/Http3Config.h
Line | Count | Source |
1 | | /** @file |
2 | | * |
3 | | * HTTP/3 Config |
4 | | * |
5 | | * @section license License |
6 | | * |
7 | | * Licensed to the Apache Software Foundation (ASF) under one |
8 | | * or more contributor license agreements. See the NOTICE file |
9 | | * distributed with this work for additional information |
10 | | * regarding copyright ownership. The ASF licenses this file |
11 | | * to you under the Apache License, Version 2.0 (the |
12 | | * "License"); you may not use this file except in compliance |
13 | | * with the License. You may obtain a copy of the License at |
14 | | * |
15 | | * http://www.apache.org/licenses/LICENSE-2.0 |
16 | | * |
17 | | * Unless required by applicable law or agreed to in writing, software |
18 | | * distributed under the License is distributed on an "AS IS" BASIS, |
19 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
20 | | * See the License for the specific language governing permissions and |
21 | | * limitations under the License. |
22 | | */ |
23 | | |
24 | | #pragma once |
25 | | |
26 | | #include "iocore/eventsystem/ConfigProcessor.h" |
27 | | |
28 | | namespace ts |
29 | | { |
30 | | class Http3ConfigParams : public ConfigInfo |
31 | | { |
32 | | public: |
33 | 1 | Http3ConfigParams(){}; |
34 | 0 | ~Http3ConfigParams(){}; |
35 | | |
36 | | void initialize(); |
37 | | |
38 | | uint32_t header_table_size() const; |
39 | | uint32_t max_field_section_size() const; |
40 | | uint32_t qpack_blocked_streams() const; |
41 | | uint32_t num_placeholders() const; |
42 | | uint32_t max_settings() const; |
43 | | |
44 | | private: |
45 | | uint32_t _header_table_size = 0; |
46 | | uint32_t _max_field_section_size = 0; |
47 | | uint32_t _qpack_blocked_streams = 0; |
48 | | uint32_t _num_placeholders = 0; |
49 | | uint32_t _max_settings = 10; |
50 | | }; |
51 | | |
52 | | class Http3Config |
53 | | { |
54 | | public: |
55 | | static void startup(); |
56 | | static void reconfigure(); |
57 | | static Http3ConfigParams *acquire(); |
58 | | static void release(Http3ConfigParams *params); |
59 | | |
60 | | using scoped_config = ConfigProcessor::scoped_config<Http3Config, Http3ConfigParams>; |
61 | | |
62 | | private: |
63 | | static int _config_id; |
64 | | }; |
65 | | |
66 | | } // namespace ts |