Skip to content

Commit

Permalink
MEDIUM: add guid keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 authored and mjuraga committed Jun 19, 2024
1 parent 1217c4e commit 86ef212
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions params/bind-options.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func getBindOptions() []BindOption {
&BindOptionValue{Name: "quic-cc-algo"},
&BindOptionValue{Name: "quic-socket"},
&BindOptionValue{Name: "nbconn"},
&BindOptionValue{Name: "guid-prefix"},
}
}

Expand Down
1 change: 1 addition & 0 deletions params/server-options.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ func getServerOptions() []ServerOption {
&ServerOptionValue{Name: "pool-low-conn"},
&ServerOptionValue{Name: "ws"},
&ServerOptionValue{Name: "log-bufsize"},
&ServerOptionValue{Name: "guid"},
&ServerOptionIDValue{Name: "set-proxy-v2-tlv-fmt"},
}
}
Expand Down
3 changes: 3 additions & 0 deletions section-parsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ func (p *configParser) getFrontendParser() *Parsers {
addParser(parser, &sequence, &http.HTTPErrors{})
addParser(parser, &sequence, &parsers.DeclareCapture{})
addParser(parser, &sequence, &simple.Number{Name: "rate-limit sessions"})
addParser(parser, &sequence, &simple.Word{Name: "guid"})
return p.createParsers(parser, sequence)
}

Expand Down Expand Up @@ -654,6 +655,7 @@ func (p *configParser) getBackendParser() *Parsers {
addParser(parser, &sequence, &parsers.Source{})
addParser(parser, &sequence, &parsers.Persist{})
addParser(parser, &sequence, &simple.Number{Name: "hash-balance-factor"})
addParser(parser, &sequence, &simple.Word{Name: "guid"})
return p.createParsers(parser, sequence)
}

Expand Down Expand Up @@ -811,6 +813,7 @@ func (p *configParser) getListenParser() *Parsers {
addParser(parser, &sequence, &parsers.Source{})
addParser(parser, &sequence, &parsers.Persist{})
addParser(parser, &sequence, &simple.Number{Name: "rate-limit sessions"})
addParser(parser, &sequence, &simple.Word{Name: "guid"})
}
return p.createParsers(parser, sequence)
}
Expand Down
1 change: 1 addition & 0 deletions tests/bind_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tests/configs/haproxy_generated.cfg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/integration/backend_data_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/integration/backend_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/integration/frontend_data_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/integration/frontend_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions tests/server_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ type ACL struct {
//test:fail:bind :443 quic-socket something
//test:ok:bind :443 nbconn 1
//test:ok:bind :443 nbconn +2
//test:ok:bind :443 guid-prefix guid-example
type Bind struct {
Path string // can be address:port or socket path
Params []params.BindOption
Expand Down Expand Up @@ -1051,6 +1052,7 @@ type Peer struct {
//test:ok:server name 127.0.0.1 ws h2
//test:ok:server name 127.0.0.1 ws auto
//test:ok:server name 127.0.0.1 log-bufsize 10
//test:ok:server name 127.0.0.1 guid guid-example
//test:fail:server
type Server struct {
Name string
Expand Down

0 comments on commit 86ef212

Please sign in to comment.