169
store UpdateStore,
170
opts ...Option,
172
>
r := ®istry{
173
>
updates: make(map[string]*Update),
174
>
store: store,
175
>
instrumentation: noopInstrumentation,
176
>
failoverVersion: store.GetCurrentVersion(),
177
>
maxTotal: func() int { return 0 }, // ie disabled
178
maxInFlightUpdateSize: func() int { return 0 }, // ie disabled
179
maxInFlightUpdateCount: func() int { return 0 }, // ie disabled
180
maxTotalSuggestContinueAsNewThreshold: func() float64 { return 0 }, // ie disabled
181
}
182
>
r.maxTotalSuggestContinueAsNew = func() int {
registry.go
183
return int(math.Ceil(float64(r.maxTotal()) * r.maxTotalSuggestContinueAsNewThreshold()))
184
}
186
opt(r)
187
}
188
189
>
r.store.VisitUpdates(func(updID string, updInfo *persistencespb.UpdateInfo) {
registry.go
190
if updInfo.GetAdmission() != nil {
191
// An Update entry in the Registry may have a request payload: we use this to write the payload to an