Skip to content

Commit ccbc51e

Browse files
committed
MEDIUM: configuration: add a couple of missing keywords
- added tune.quic.frontend.max-tx-mem to global tune_quic_options - added compression minsize-req and minsize-res to compression keyword - added recv-only flag to stick-table and table resources
1 parent 8ce7713 commit ccbc51e

43 files changed

Lines changed: 754 additions & 53 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.aspell.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ allowed:
101101
- mexchanger
102102
- migrator
103103
- minimalistic
104+
- minsize
104105
- mixin
105106
- mkdir
106107
- multipartsearch
@@ -124,6 +125,7 @@ allowed:
124125
- rbac
125126
- readme
126127
- recursivity
128+
- recv
127129
- redoc
128130
- reimplement
129131
- releaser
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
Copyright 2022 HAProxy Technologies
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+
package parsers
18+
19+
import (
20+
"github.com/haproxytech/client-native/v6/config-parser/common"
21+
"github.com/haproxytech/client-native/v6/config-parser/errors"
22+
"github.com/haproxytech/client-native/v6/config-parser/types"
23+
)
24+
25+
type CompressionMinsizeReq struct {
26+
data *types.StringC
27+
preComments []string // comments that appear before the actual line
28+
}
29+
30+
func (c *CompressionMinsizeReq) Parse(line string, parts []string, comment string) (string, error) {
31+
if len(parts) < 3 {
32+
return "", &errors.ParseError{Parser: "CompressionMinsizeReq", Line: line, Message: "Parse error"}
33+
}
34+
c.data = &types.StringC{
35+
Value: parts[2],
36+
Comment: comment,
37+
}
38+
return "", nil
39+
}
40+
41+
func (c *CompressionMinsizeReq) Result() ([]common.ReturnResultLine, error) {
42+
if c.data == nil {
43+
return nil, errors.ErrFetch
44+
}
45+
return []common.ReturnResultLine{
46+
{
47+
Data: "compression minsize-req " + c.data.Value,
48+
Comment: c.data.Comment,
49+
},
50+
}, nil
51+
}

config-parser/parsers/compression-minsize-req_generated.go

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
Copyright 2022 HAProxy Technologies
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+
package parsers
18+
19+
import (
20+
"github.com/haproxytech/client-native/v6/config-parser/common"
21+
"github.com/haproxytech/client-native/v6/config-parser/errors"
22+
"github.com/haproxytech/client-native/v6/config-parser/types"
23+
)
24+
25+
type CompressionMinsizeRes struct {
26+
data *types.StringC
27+
preComments []string // comments that appear before the actual line
28+
}
29+
30+
func (c *CompressionMinsizeRes) Parse(line string, parts []string, comment string) (string, error) {
31+
if len(parts) < 3 {
32+
return "", &errors.ParseError{Parser: "CompressionMinsizeRes", Line: line, Message: "Parse error"}
33+
}
34+
c.data = &types.StringC{
35+
Value: parts[2],
36+
Comment: comment,
37+
}
38+
return "", nil
39+
}
40+
41+
func (c *CompressionMinsizeRes) Result() ([]common.ReturnResultLine, error) {
42+
if c.data == nil {
43+
return nil, errors.ErrFetch
44+
}
45+
return []common.ReturnResultLine{
46+
{
47+
Data: "compression minsize-res " + c.data.Value,
48+
Comment: c.data.Comment,
49+
},
50+
}, nil
51+
}

config-parser/parsers/compression-minsize-res_generated.go

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/parsers/stick-table.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ func (h *StickTable) parse(line string, parts []string, comment string) (*types.
8888
return nil, &errors.ParseError{Parser: "StickTable", Line: line}
8989
}
9090
data.Store = parts[index]
91+
case "recv-only":
92+
data.RecvOnly = true
9193
default:
9294
return nil, &errors.ParseError{Parser: "StickTable", Line: line}
9395
}
@@ -151,6 +153,9 @@ func (h *StickTable) Result() ([]common.ReturnResultLine, error) {
151153
data.WriteString(" store ")
152154
data.WriteString(req.Store)
153155
}
156+
if req.RecvOnly {
157+
data.WriteString(" recv-only")
158+
}
154159
result[0] = common.ReturnResultLine{
155160
Data: data.String(),
156161
Comment: req.Comment,

config-parser/parsers/table.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ func (t *Table) parse(line string, parts []string, comment string) (*types.Table
8787
} else {
8888
data.Store = fmt.Sprintf("%s,%s", data.Store, parts[index])
8989
}
90+
case "recv-only":
91+
data.RecvOnly = true
9092
default:
9193
return nil, &errors.ParseError{Parser: "Table", Line: line}
9294
}
@@ -132,6 +134,9 @@ func (t *Table) Result() ([]common.ReturnResultLine, error) {
132134
data.WriteString(" store ")
133135
data.WriteString(table.Store)
134136
}
137+
if table.RecvOnly {
138+
data.WriteString(" recv-only")
139+
}
135140

136141
result[index] = common.ReturnResultLine{
137142
Data: data.String(),

0 commit comments

Comments
 (0)