-
Notifications
You must be signed in to change notification settings - Fork 0
/
limited_priority_level_configuration.cr
37 lines (32 loc) · 2.2 KB
/
limited_priority_level_configuration.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:
# * How are requests for this priority level limited?
# * What should be done with requests that exceed the limit?
@[::K8S::Properties(
assured_concurrency_shares: {type: Int32, nilable: true, key: "assuredConcurrencyShares", getter: false, setter: false},
limit_response: {type: Api::Flowcontrol::V1alpha1::LimitResponse, nilable: true, key: "limitResponse", getter: false, setter: false},
)]
class Api::Flowcontrol::V1alpha1::LimitedPriorityLevelConfiguration
include ::JSON::Serializable
include ::JSON::Serializable::Unmapped
include ::YAML::Serializable
include ::YAML::Serializable::Unmapped
# `assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:
#
# ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )
#
# bigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.
@[::JSON::Field(key: "assuredConcurrencyShares", emit_null: false)]
@[::YAML::Field(key: "assuredConcurrencyShares", emit_null: false)]
property assured_concurrency_shares : Int32 | Nil
# `limitResponse` indicates what to do with requests that can not be executed right now
@[::JSON::Field(key: "limitResponse", emit_null: false)]
@[::YAML::Field(key: "limitResponse", emit_null: false)]
property limit_response : Api::Flowcontrol::V1alpha1::LimitResponse | Nil
def initialize(*, @assured_concurrency_shares : Int32 | Nil = nil, @limit_response : Api::Flowcontrol::V1alpha1::LimitResponse | Nil = nil)
end
end
end