Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lb): add support for ConnectionRateLimit #2422

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/lb/v1/lb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,9 @@ type Frontend struct {

// EnableHTTP3: defines whether to enable HTTP/3 protocol on the frontend.
EnableHTTP3 bool `json:"enable_http3"`

// ConnectionRateLimit: rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
ConnectionRateLimit *uint32 `json:"connection_rate_limit"`
}

func (m *Frontend) UnmarshalJSON(b []byte) error {
Expand Down Expand Up @@ -2066,6 +2069,9 @@ type CreateFrontendRequest struct {

// EnableHTTP3: defines whether to enable HTTP/3 protocol on the frontend.
EnableHTTP3 bool `json:"enable_http3"`

// ConnectionRateLimit: rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
ConnectionRateLimit *uint32 `json:"connection_rate_limit,omitempty"`
}

func (m *CreateFrontendRequest) UnmarshalJSON(b []byte) error {
Expand Down Expand Up @@ -3179,6 +3185,9 @@ type UpdateFrontendRequest struct {

// EnableHTTP3: defines whether to enable HTTP/3 protocol on the frontend.
EnableHTTP3 bool `json:"enable_http3"`

// ConnectionRateLimit: rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
ConnectionRateLimit *uint32 `json:"connection_rate_limit,omitempty"`
}

func (m *UpdateFrontendRequest) UnmarshalJSON(b []byte) error {
Expand Down Expand Up @@ -3595,6 +3604,9 @@ type ZonedAPICreateFrontendRequest struct {

// EnableHTTP3: defines whether to enable HTTP/3 protocol on the frontend.
EnableHTTP3 bool `json:"enable_http3"`

// ConnectionRateLimit: rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
ConnectionRateLimit *uint32 `json:"connection_rate_limit,omitempty"`
}

func (m *ZonedAPICreateFrontendRequest) UnmarshalJSON(b []byte) error {
Expand Down Expand Up @@ -4378,6 +4390,9 @@ type ZonedAPIUpdateFrontendRequest struct {

// EnableHTTP3: defines whether to enable HTTP/3 protocol on the frontend.
EnableHTTP3 bool `json:"enable_http3"`

// ConnectionRateLimit: rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
ConnectionRateLimit *uint32 `json:"connection_rate_limit,omitempty"`
}

func (m *ZonedAPIUpdateFrontendRequest) UnmarshalJSON(b []byte) error {
Expand Down
Loading