You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go CRD Comment Updates for Counters and Lists (#3536)
Updated some comments on the Counter and Lists with an aim to make the
generated reference document more readable and provide more context of
the operations therein.
Work on #2716
// GameServerSelector contains all the filter options for selecting
@@ -146,40 +147,56 @@ type PlayerSelector struct {
146
147
}
147
148
148
149
// CounterSelector is the filter options for a GameServer based on the count and/or available capacity.
149
-
// 0 for MaxCount or MaxAvailable means unlimited maximum. Default for all fields: 0
150
150
typeCounterSelectorstruct {
151
-
MinCountint64`json:"minCount"`
152
-
MaxCountint64`json:"maxCount"`
151
+
// MinCount is the minimum current value. Defaults to 0.
152
+
// +optional
153
+
MinCountint64`json:"minCount"`
154
+
// MaxCount is the maximum current value. Defaults to 0, which translates as max(in64).
155
+
// +optional
156
+
MaxCountint64`json:"maxCount"`
157
+
// MinAvailable specifies the minimum capacity (current capacity - current count) available on a GameServer. Defaults to 0.
158
+
// +optional
153
159
MinAvailableint64`json:"minAvailable"`
160
+
// MaxAvailable specifies the maximum capacity (current capacity - current count) available on a GameServer. Defaults to 0, which translates to max(int64).
161
+
// +optional
154
162
MaxAvailableint64`json:"maxAvailable"`
155
163
}
156
164
157
165
// ListSelector is the filter options for a GameServer based on List available capacity and/or the
158
166
// existence of a value in a List.
159
-
// 0 for MaxAvailable means unlimited maximum. Default for integer fields: 0
160
-
// "" for ContainsValue means ignore field. Default for string field: ""
161
167
typeListSelectorstruct {
168
+
// ContainsValue says to only match GameServers who has this value in the list. Defaults to "", which is all.
169
+
// +optional
162
170
ContainsValuestring`json:"containsValue"`
163
-
MinAvailableint64`json:"minAvailable"`
164
-
MaxAvailableint64`json:"maxAvailable"`
171
+
// MinAvailable specifies the minimum capacity (current capacity - current count) available on a GameServer. Defaults to 0.
172
+
// +optional
173
+
MinAvailableint64`json:"minAvailable"`
174
+
// MaxAvailable specifies the maximum capacity (current capacity - current count) available on a GameServer. Defaults to 0, which is translated as max(int64).
175
+
// +optional
176
+
MaxAvailableint64`json:"maxAvailable"`
165
177
}
166
178
167
179
// CounterAction is an optional action that can be performed on a Counter at allocation.
168
-
// Action: "Increment" or "Decrement" the Counter's Count (optional). Must also define the Amount.
169
-
// Amount: The amount to increment or decrement the Count (optional). Must be a positive integer.
170
-
// Capacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max int64.
171
180
typeCounterActionstruct {
172
-
Action*string`json:"action,omitempty"`
173
-
Amount*int64`json:"amount,omitempty"`
174
-
Capacity*int64`json:"capacity,omitempty"`
181
+
// Action must to either "Increment" or "Decrement" the Counter's Count. Must also define the Amount.
182
+
// +optional
183
+
Action*string`json:"action,omitempty"`
184
+
// Amount is the amount to increment or decrement the Count. Must be a positive integer.
185
+
// +optional
186
+
Amount*int64`json:"amount,omitempty"`
187
+
// Capacity is the amount to update the maximum capacity of the Counter to this number. Min 0, Max int64.
188
+
// +optional
189
+
Capacity*int64`json:"capacity,omitempty"`
175
190
}
176
191
177
192
// ListAction is an optional action that can be performed on a List at allocation.
178
-
// AddValues: Append values to a List's Values array (optional). Any duplicate values will be ignored.
179
-
// Capacity: Update the maximum capacity of the Counter to this number (optional). Min 0, Max 1000.
180
193
typeListActionstruct {
194
+
// AddValues appends values to a List's Values array. Any duplicate values will be ignored.
195
+
// +optional
181
196
AddValues []string`json:"addValues,omitempty"`
182
-
Capacity*int64`json:"capacity,omitempty"`
197
+
// Capacity updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
0 commit comments