@systemfsoftware/effect-daemon-spec 4.1.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +141 -26
- package/dist/index.d.ts +1386 -304
- package/dist/index.mjs +1605 -1038
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +27 -16
- package/dist/effect-daemon-spec-untrimmed.d.ts +0 -412
- package/dist/effect-daemon-spec.d.ts +0 -412
package/dist/index.d.ts
CHANGED
|
@@ -1,340 +1,1422 @@
|
|
|
1
|
-
import { Cause, Context,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}>,
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { Cause, Context, Deferred, Effect, HashMap, Layer, Option, PubSub, Queue, Ref, Schema, Scope } from "effect";
|
|
2
|
+
import { Handle, Workflow } from "@systemfsoftware/effect-cell-types";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
import { Pipeable } from "effect/Pipeable";
|
|
5
|
+
//#region src/kernel/SupervisorPolicy.schema.d.ts
|
|
6
|
+
declare const RestartStrategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
7
|
+
type RestartStrategy = typeof RestartStrategy.Type;
|
|
8
|
+
declare const AutoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
9
|
+
type AutoShutdown = typeof AutoShutdown.Type;
|
|
10
|
+
declare const BrutalShutdown: Schema.TaggedStruct<"Brutal", {}>;
|
|
11
|
+
type BrutalShutdown = typeof BrutalShutdown.Type;
|
|
12
|
+
declare const GracefulShutdown: Schema.TaggedStruct<"Graceful", {
|
|
13
|
+
readonly millis: Schema.Int;
|
|
14
|
+
}>;
|
|
15
|
+
type GracefulShutdown = typeof GracefulShutdown.Type;
|
|
16
|
+
declare const InfinityShutdown: Schema.TaggedStruct<"Infinity", {}>;
|
|
17
|
+
type InfinityShutdown = typeof InfinityShutdown.Type;
|
|
18
|
+
declare const ShutdownMode: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
19
|
+
readonly millis: Schema.Int;
|
|
20
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
21
|
+
type ShutdownMode = typeof ShutdownMode.Type;
|
|
22
|
+
declare const BackoffSchedule: Schema.Struct<{
|
|
23
|
+
readonly baseMillis: Schema.Int;
|
|
24
|
+
readonly multiplier: Schema.Int;
|
|
25
|
+
readonly capMillis: Schema.Int;
|
|
26
|
+
}>;
|
|
27
|
+
type BackoffSchedule = typeof BackoffSchedule.Type;
|
|
28
|
+
declare const ChildDeclaration: Schema.Struct<{
|
|
29
|
+
readonly childId: Schema.String;
|
|
30
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
31
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
32
|
+
readonly millis: Schema.Int;
|
|
33
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
34
|
+
readonly significant: Schema.Boolean;
|
|
35
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
36
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
37
|
+
}>;
|
|
38
|
+
type ChildDeclaration = typeof ChildDeclaration.Type;
|
|
39
|
+
declare const DynamicKind: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
40
|
+
readonly ceiling: Schema.Int;
|
|
41
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
42
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
43
|
+
readonly millis: Schema.Int;
|
|
44
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
45
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
46
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
47
|
+
}>]>;
|
|
48
|
+
type DynamicKind = typeof DynamicKind.Type;
|
|
42
49
|
//#endregion
|
|
43
|
-
//#region src/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
//#region src/kernel/TerminationReport.schema.d.ts
|
|
51
|
+
/**
|
|
52
|
+
* What a medium can say about why a child died (R16): a fiber supplies a cause, a process
|
|
53
|
+
* supplies an exit status and signal, and a remote runner's death is inferred. No event
|
|
54
|
+
* claims a level its medium cannot supply — the medium declares which one it reports, and
|
|
55
|
+
* the kernel assumes nothing beyond that declaration.
|
|
56
|
+
*/
|
|
57
|
+
declare const CauseReport: Schema.TaggedStruct<"CauseReport", {
|
|
58
|
+
readonly cause: Schema.String;
|
|
59
|
+
}>;
|
|
60
|
+
type CauseReport = typeof CauseReport.Type;
|
|
61
|
+
declare const ExitReport: Schema.TaggedStruct<"ExitReport", {
|
|
62
|
+
readonly code: Schema.Int;
|
|
63
|
+
readonly signal: Schema.String;
|
|
64
|
+
}>;
|
|
65
|
+
type ExitReport = typeof ExitReport.Type;
|
|
66
|
+
declare const InferredReport: Schema.TaggedStruct<"InferredReport", {
|
|
67
|
+
readonly failedProbes: Schema.Int;
|
|
68
|
+
}>;
|
|
69
|
+
type InferredReport = typeof InferredReport.Type;
|
|
70
|
+
declare const DeadlineMissedReport: Schema.TaggedStruct<"DeadlineMissed", {
|
|
71
|
+
readonly waitedMillis: Schema.Int;
|
|
72
|
+
}>;
|
|
73
|
+
type DeadlineMissedReport = typeof DeadlineMissedReport.Type;
|
|
74
|
+
declare const FailureReport: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
75
|
+
readonly cause: Schema.String;
|
|
76
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
77
|
+
readonly code: Schema.Int;
|
|
78
|
+
readonly signal: Schema.String;
|
|
79
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
80
|
+
readonly failedProbes: Schema.Int;
|
|
81
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
82
|
+
readonly waitedMillis: Schema.Int;
|
|
83
|
+
}>]>;
|
|
84
|
+
type FailureReport = typeof FailureReport.Type;
|
|
85
|
+
declare const NormalTermination: Schema.TaggedStruct<"Normal", {}>;
|
|
86
|
+
type NormalTermination = typeof NormalTermination.Type;
|
|
87
|
+
declare const ShutdownTermination: Schema.TaggedStruct<"Shutdown", {}>;
|
|
88
|
+
type ShutdownTermination = typeof ShutdownTermination.Type;
|
|
89
|
+
declare const AbnormalTermination: Schema.TaggedStruct<"Abnormal", {
|
|
90
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
91
|
+
readonly cause: Schema.String;
|
|
92
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
93
|
+
readonly code: Schema.Int;
|
|
94
|
+
readonly signal: Schema.String;
|
|
95
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
96
|
+
readonly failedProbes: Schema.Int;
|
|
97
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
98
|
+
readonly waitedMillis: Schema.Int;
|
|
99
|
+
}>]>;
|
|
100
|
+
}>;
|
|
101
|
+
type AbnormalTermination = typeof AbnormalTermination.Type;
|
|
102
|
+
declare const TerminationReason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
103
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
104
|
+
readonly cause: Schema.String;
|
|
105
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
106
|
+
readonly code: Schema.Int;
|
|
107
|
+
readonly signal: Schema.String;
|
|
108
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
109
|
+
readonly failedProbes: Schema.Int;
|
|
110
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
111
|
+
readonly waitedMillis: Schema.Int;
|
|
112
|
+
}>]>;
|
|
113
|
+
}>]>;
|
|
114
|
+
type TerminationReason = typeof TerminationReason.Type;
|
|
49
115
|
//#endregion
|
|
50
|
-
//#region src/
|
|
51
|
-
|
|
52
|
-
|
|
116
|
+
//#region src/Supervisor/MediumDeclaration.schema.d.ts
|
|
117
|
+
/**
|
|
118
|
+
* What a medium can say about why a child died (R16, KTD8): the in-process fiber
|
|
119
|
+
* medium reports a full `Cause`, a process, socket or microVM medium reports the
|
|
120
|
+
* exit status and signal it observed, and the cluster medium's death is only
|
|
121
|
+
* inferred from failed liveness probes (KTD7). The kernel assumes nothing beyond
|
|
122
|
+
* the declared level; the conformance kit projects traces down to it.
|
|
123
|
+
*/
|
|
124
|
+
declare const MediumReporting: Schema.Literals<readonly ["full", "exit", "inferred"]>;
|
|
125
|
+
type MediumReporting = typeof MediumReporting.Type;
|
|
126
|
+
/**
|
|
127
|
+
* The `one_for_all` guarantee a medium can honour (R16, KTD8): `atomic` means no
|
|
128
|
+
* child is left running once the group stop returns, `eventual` means teardown
|
|
129
|
+
* continues on the medium's own clock after the call returns.
|
|
130
|
+
*/
|
|
131
|
+
declare const GroupStopGuarantee: Schema.Literals<readonly ["atomic", "eventual"]>;
|
|
132
|
+
type GroupStopGuarantee = typeof GroupStopGuarantee.Type;
|
|
133
|
+
/**
|
|
134
|
+
* A medium's declaration to the kernel (R16). Both fields are required: a
|
|
135
|
+
* declaration without a reporting level or a group-stop guarantee is refused at
|
|
136
|
+
* decode, so the kernel never guesses what a medium can say or honour.
|
|
137
|
+
*/
|
|
138
|
+
declare const MediumDeclaration: Schema.Struct<{
|
|
139
|
+
readonly reporting: Schema.Literals<readonly ["full", "exit", "inferred"]>;
|
|
140
|
+
readonly groupStop: Schema.Literals<readonly ["atomic", "eventual"]>;
|
|
141
|
+
}>;
|
|
142
|
+
type MediumDeclaration = typeof MediumDeclaration.Type;
|
|
143
|
+
declare namespace Medium_d_exports {
|
|
144
|
+
export { AbnormalTermination, BrutalShutdown, CauseReport, DeadlineMissedReport, ExitReport, FailureReport, GracefulShutdown, GroupStopGuarantee, InferredReport, InfinityShutdown, Medium, MediumDeclaration, MediumOptions, MediumPort, MediumPortShape, MediumReporting, NormalTermination, ShutdownMode, ShutdownTermination, Started, StartedTypeId, Stopped, StoppedTypeId, TerminationReason, make$1 as make, started, stopped };
|
|
53
145
|
}
|
|
54
|
-
declare const
|
|
55
|
-
|
|
56
|
-
|
|
146
|
+
declare const StartedTypeId: unique symbol;
|
|
147
|
+
type StartedTypeId = typeof StartedTypeId;
|
|
148
|
+
declare const StoppedTypeId: unique symbol;
|
|
149
|
+
type StoppedTypeId = typeof StoppedTypeId;
|
|
150
|
+
/**
|
|
151
|
+
* Evidence that a medium started a child (KTD8): unforgeable, because only a
|
|
152
|
+
* medium's `start` port can mint it. It carries the readiness signal the kernel
|
|
153
|
+
* races against its start-deadline timer (R10); the termination report and the
|
|
154
|
+
* single-shot liveness probe are the medium's `report` and `probe` ports run
|
|
155
|
+
* over this evidence, so neither can observe a child that never started.
|
|
156
|
+
*/
|
|
157
|
+
interface Started {
|
|
158
|
+
readonly [StartedTypeId]: StartedTypeId;
|
|
159
|
+
readonly ready: Effect.Effect<void>;
|
|
57
160
|
}
|
|
58
|
-
|
|
59
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Evidence that a medium stopped a child (KTD8): returned only by `stop`, which
|
|
163
|
+
* the builder wraps so owned shutdown cannot be interrupted part-way (R15).
|
|
164
|
+
*/
|
|
165
|
+
interface Stopped {
|
|
166
|
+
readonly [StoppedTypeId]: StoppedTypeId;
|
|
60
167
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
168
|
+
/** Mint `Started` evidence for a child whose readiness completes `ready`. */
|
|
169
|
+
declare const started: (ready: Effect.Effect<void>) => Started;
|
|
170
|
+
/** The single `Stopped` evidence value every medium returns from `stop`. */
|
|
171
|
+
declare const stopped: Stopped;
|
|
172
|
+
/**
|
|
173
|
+
* The child-protocol obligations a medium supplies in one options record
|
|
174
|
+
* (R15, KTD8). `start` mints `Started` evidence, `report` resolves with the
|
|
175
|
+
* child's `TerminationReason` when it terminates, `probe` answers one liveness
|
|
176
|
+
* check (the kernel runs it once per tick, KTD7), and `stop` owns shutdown in
|
|
177
|
+
* the declared R4 mode and must not be callable with anything but `Started`
|
|
178
|
+
* evidence.
|
|
179
|
+
*/
|
|
180
|
+
interface MediumOptions<Program, StartError = never, R = never> {
|
|
181
|
+
readonly declaration: MediumDeclaration;
|
|
182
|
+
readonly start: (program: Program) => Effect.Effect<Started, StartError, R>;
|
|
183
|
+
readonly report: (evidence: Started) => Effect.Effect<TerminationReason, never, R>;
|
|
184
|
+
readonly probe: (evidence: Started) => Effect.Effect<boolean, never, R>;
|
|
185
|
+
readonly stop: (evidence: Started, mode: ShutdownMode) => Effect.Effect<Stopped, never, R>;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A medium: the child protocol over one program type (R15–R17). Child order and
|
|
189
|
+
* identity come from the supervisor, never from the medium.
|
|
190
|
+
*/
|
|
191
|
+
type Medium<Program, StartError = never, R = never> = MediumOptions<Program, StartError, R>;
|
|
192
|
+
/**
|
|
193
|
+
* KTD8: a medium exists only through `make`, whose options record requires every
|
|
194
|
+
* obligation. `stop` is wrapped in an uninterruptible region, so owned shutdown
|
|
195
|
+
* honouring R4's modes cannot be interrupted part-way (R15).
|
|
196
|
+
*/
|
|
197
|
+
declare const make$1: <Program, StartError = never, R = never>(options: MediumOptions<Program, StartError, R>) => Medium<Program, StartError, R>;
|
|
198
|
+
/**
|
|
199
|
+
* The capability a driver provides for one program type (KTD9): the medium that
|
|
200
|
+
* interprets the child's program. The driver binds it as `layer(options)` at the
|
|
201
|
+
* composition root, so one tree can mix media while strategy, order and policy
|
|
202
|
+
* never name a medium implementation (R17, R18).
|
|
203
|
+
*/
|
|
204
|
+
interface MediumPortShape<Program, StartError = never, R = never> {
|
|
205
|
+
readonly medium: Medium<Program, StartError, R>;
|
|
206
|
+
}
|
|
207
|
+
/** Declare a medium port keyed to the program type it interprets (KTD9). */
|
|
208
|
+
declare const MediumPort: <Program, StartError = never, R = never>(key: string) => Context.Service<MediumPortShape<Program, StartError, R>, MediumPortShape<Program, StartError, R>>;
|
|
70
209
|
//#endregion
|
|
71
|
-
//#region src/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
210
|
+
//#region src/Supervisor/SupervisorTerminated.schema.d.ts
|
|
211
|
+
declare const SupervisorTerminated_base: Schema.Class<SupervisorTerminated, Schema.TaggedStruct<"SupervisorTerminated", {
|
|
212
|
+
readonly name: Schema.String;
|
|
213
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
214
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
215
|
+
readonly cause: Schema.String;
|
|
216
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
217
|
+
readonly code: Schema.Int;
|
|
218
|
+
readonly signal: Schema.String;
|
|
219
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
220
|
+
readonly failedProbes: Schema.Int;
|
|
221
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
222
|
+
readonly waitedMillis: Schema.Int;
|
|
223
|
+
}>]>;
|
|
224
|
+
}>]>;
|
|
225
|
+
readonly cause: Schema.Cause<Schema.Unknown, Schema.Unknown>;
|
|
226
|
+
}>, Cause.YieldableError>;
|
|
227
|
+
declare class SupervisorTerminated extends SupervisorTerminated_base {
|
|
228
|
+
get message(): string;
|
|
229
|
+
}
|
|
230
|
+
declare namespace FiberMedium_d_exports {
|
|
231
|
+
export { BareFiberProgram, FiberProgram, failureCauseOf, fiberPort, medium, mediumFor, readyOnStart };
|
|
232
|
+
}
|
|
233
|
+
type BareFiberProgram = Effect.Effect<void, SupervisorTerminated, Scope.Scope>;
|
|
234
|
+
type FiberProgram = (ready: Effect.Effect<void>) => BareFiberProgram;
|
|
235
|
+
declare const readyOnStart: (program: BareFiberProgram) => FiberProgram;
|
|
236
|
+
declare const fiberPort: import("effect/Context").Service<MediumPortShape<FiberProgram, never, Scope.Scope>, MediumPortShape<FiberProgram, never, Scope.Scope>>;
|
|
237
|
+
declare const failureCauseOf: (evidence: Started) => Option.Option<Effect.Effect<Option.Option<Cause.Cause<SupervisorTerminated>>>>;
|
|
238
|
+
declare const mediumFor: <R = never>() => Medium<(ready: Effect.Effect<void>) => Effect.Effect<void, SupervisorTerminated, Scope.Scope | R>, never, Scope.Scope | R>;
|
|
239
|
+
declare const medium: Medium<FiberProgram, never, Scope.Scope>;
|
|
78
240
|
//#endregion
|
|
79
|
-
//#region src/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
241
|
+
//#region src/kernel/SupervisionTypeIds.d.ts
|
|
242
|
+
declare const DecisionTypeId: unique symbol;
|
|
243
|
+
type DecisionTypeId = typeof DecisionTypeId;
|
|
244
|
+
declare const StateTypeId: unique symbol;
|
|
245
|
+
type StateTypeId = typeof StateTypeId;
|
|
84
246
|
//#endregion
|
|
85
|
-
//#region src/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
readonly
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
247
|
+
//#region src/kernel/interpret-supervision-event.workflow.d.ts
|
|
248
|
+
declare const Stale_base: Schema.Class<Stale, Schema.TaggedStruct<"Stale", {}>, {}>;
|
|
249
|
+
declare class Stale extends Stale_base {
|
|
250
|
+
readonly [DecisionTypeId]: symbol;
|
|
251
|
+
}
|
|
252
|
+
declare const Continue_base: Schema.Class<Continue, Schema.TaggedStruct<"Continue", {
|
|
253
|
+
readonly core: Schema.Struct<{
|
|
254
|
+
readonly policy: Schema.Struct<{
|
|
255
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
256
|
+
intensity: Schema.Int;
|
|
257
|
+
periodMillis: Schema.Int;
|
|
258
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
259
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
260
|
+
readonly millis: Schema.Int;
|
|
261
|
+
}>]>;
|
|
262
|
+
backoff: Schema.Struct<{
|
|
263
|
+
readonly baseMillis: Schema.Int;
|
|
264
|
+
readonly multiplier: Schema.Int;
|
|
265
|
+
readonly capMillis: Schema.Int;
|
|
266
|
+
}>;
|
|
267
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
268
|
+
readonly ceiling: Schema.Int;
|
|
269
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
270
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
271
|
+
readonly millis: Schema.Int;
|
|
272
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
273
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
274
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
275
|
+
}>]>;
|
|
276
|
+
livenessTickMillis: Schema.Int;
|
|
277
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
278
|
+
readonly childId: Schema.String;
|
|
279
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
280
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
281
|
+
readonly millis: Schema.Int;
|
|
282
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
283
|
+
readonly significant: Schema.Boolean;
|
|
284
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
285
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
286
|
+
}>>;
|
|
287
|
+
}>;
|
|
288
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
289
|
+
readonly childId: Schema.String;
|
|
290
|
+
readonly generation: Schema.Int;
|
|
291
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
292
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
293
|
+
readonly probeFailures: Schema.Int;
|
|
294
|
+
}>>;
|
|
295
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
296
|
+
readonly nextOrdinal: Schema.Int;
|
|
297
|
+
}>;
|
|
298
|
+
readonly commands: Schema.Struct<{
|
|
299
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
300
|
+
readonly childId: Schema.String;
|
|
301
|
+
readonly generation: Schema.Int;
|
|
302
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
303
|
+
readonly millis: Schema.Int;
|
|
304
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
305
|
+
}>>;
|
|
306
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
307
|
+
readonly childId: Schema.String;
|
|
308
|
+
readonly generation: Schema.Int;
|
|
309
|
+
}>>;
|
|
310
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
311
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
312
|
+
readonly childId: Schema.String;
|
|
313
|
+
readonly generation: Schema.Int;
|
|
314
|
+
readonly deadline: Schema.Int;
|
|
315
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
316
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
317
|
+
readonly deadline: Schema.Int;
|
|
318
|
+
}>]>>;
|
|
319
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
320
|
+
readonly requestId: Schema.String;
|
|
321
|
+
readonly childId: Schema.String;
|
|
322
|
+
readonly generation: Schema.Int;
|
|
323
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
324
|
+
readonly requestId: Schema.String;
|
|
325
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
326
|
+
readonly requestId: Schema.String;
|
|
327
|
+
}>]>>;
|
|
328
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
329
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
330
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
331
|
+
readonly cause: Schema.String;
|
|
332
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
333
|
+
readonly code: Schema.Int;
|
|
334
|
+
readonly signal: Schema.String;
|
|
335
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
336
|
+
readonly failedProbes: Schema.Int;
|
|
337
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
338
|
+
readonly waitedMillis: Schema.Int;
|
|
339
|
+
}>]>;
|
|
340
|
+
}>]>;
|
|
341
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
342
|
+
readonly childId: Schema.String;
|
|
343
|
+
readonly generation: Schema.Int;
|
|
344
|
+
}>]>;
|
|
345
|
+
}>>;
|
|
346
|
+
}>;
|
|
96
347
|
}>, {}>;
|
|
97
|
-
|
|
98
|
-
readonly [
|
|
99
|
-
}
|
|
100
|
-
declare const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
348
|
+
declare class Continue extends Continue_base {
|
|
349
|
+
readonly [DecisionTypeId]: symbol;
|
|
350
|
+
}
|
|
351
|
+
declare const RestartChildren_base: Schema.Class<RestartChildren, Schema.TaggedStruct<"RestartChildren", {
|
|
352
|
+
readonly core: Schema.Struct<{
|
|
353
|
+
readonly policy: Schema.Struct<{
|
|
354
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
355
|
+
intensity: Schema.Int;
|
|
356
|
+
periodMillis: Schema.Int;
|
|
357
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
358
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
359
|
+
readonly millis: Schema.Int;
|
|
360
|
+
}>]>;
|
|
361
|
+
backoff: Schema.Struct<{
|
|
362
|
+
readonly baseMillis: Schema.Int;
|
|
363
|
+
readonly multiplier: Schema.Int;
|
|
364
|
+
readonly capMillis: Schema.Int;
|
|
365
|
+
}>;
|
|
366
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
367
|
+
readonly ceiling: Schema.Int;
|
|
368
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
369
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
370
|
+
readonly millis: Schema.Int;
|
|
371
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
372
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
373
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
374
|
+
}>]>;
|
|
375
|
+
livenessTickMillis: Schema.Int;
|
|
376
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
377
|
+
readonly childId: Schema.String;
|
|
378
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
379
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
380
|
+
readonly millis: Schema.Int;
|
|
381
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
382
|
+
readonly significant: Schema.Boolean;
|
|
383
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
384
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
385
|
+
}>>;
|
|
386
|
+
}>;
|
|
387
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
388
|
+
readonly childId: Schema.String;
|
|
389
|
+
readonly generation: Schema.Int;
|
|
390
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
391
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
392
|
+
readonly probeFailures: Schema.Int;
|
|
393
|
+
}>>;
|
|
394
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
395
|
+
readonly nextOrdinal: Schema.Int;
|
|
396
|
+
}>;
|
|
397
|
+
readonly pending: Schema.$Array<Schema.Struct<{
|
|
398
|
+
readonly childId: Schema.String;
|
|
399
|
+
readonly generation: Schema.Int;
|
|
111
400
|
}>>;
|
|
401
|
+
readonly commands: Schema.Struct<{
|
|
402
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
403
|
+
readonly childId: Schema.String;
|
|
404
|
+
readonly generation: Schema.Int;
|
|
405
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
406
|
+
readonly millis: Schema.Int;
|
|
407
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
408
|
+
}>>;
|
|
409
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
410
|
+
readonly childId: Schema.String;
|
|
411
|
+
readonly generation: Schema.Int;
|
|
412
|
+
}>>;
|
|
413
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
414
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
415
|
+
readonly childId: Schema.String;
|
|
416
|
+
readonly generation: Schema.Int;
|
|
417
|
+
readonly deadline: Schema.Int;
|
|
418
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
419
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
420
|
+
readonly deadline: Schema.Int;
|
|
421
|
+
}>]>>;
|
|
422
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
423
|
+
readonly requestId: Schema.String;
|
|
424
|
+
readonly childId: Schema.String;
|
|
425
|
+
readonly generation: Schema.Int;
|
|
426
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
427
|
+
readonly requestId: Schema.String;
|
|
428
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
429
|
+
readonly requestId: Schema.String;
|
|
430
|
+
}>]>>;
|
|
431
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
432
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
433
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
434
|
+
readonly cause: Schema.String;
|
|
435
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
436
|
+
readonly code: Schema.Int;
|
|
437
|
+
readonly signal: Schema.String;
|
|
438
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
439
|
+
readonly failedProbes: Schema.Int;
|
|
440
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
441
|
+
readonly waitedMillis: Schema.Int;
|
|
442
|
+
}>]>;
|
|
443
|
+
}>]>;
|
|
444
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
445
|
+
readonly childId: Schema.String;
|
|
446
|
+
readonly generation: Schema.Int;
|
|
447
|
+
}>]>;
|
|
448
|
+
}>>;
|
|
449
|
+
}>;
|
|
450
|
+
}>, {}>;
|
|
451
|
+
declare class RestartChildren extends RestartChildren_base {
|
|
452
|
+
readonly [DecisionTypeId]: symbol;
|
|
453
|
+
}
|
|
454
|
+
declare const StartChildren_base: Schema.Class<StartChildren, Schema.TaggedStruct<"StartChildren", {
|
|
455
|
+
readonly core: Schema.Struct<{
|
|
456
|
+
readonly policy: Schema.Struct<{
|
|
457
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
458
|
+
intensity: Schema.Int;
|
|
459
|
+
periodMillis: Schema.Int;
|
|
460
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
461
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
462
|
+
readonly millis: Schema.Int;
|
|
463
|
+
}>]>;
|
|
464
|
+
backoff: Schema.Struct<{
|
|
465
|
+
readonly baseMillis: Schema.Int;
|
|
466
|
+
readonly multiplier: Schema.Int;
|
|
467
|
+
readonly capMillis: Schema.Int;
|
|
468
|
+
}>;
|
|
469
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
470
|
+
readonly ceiling: Schema.Int;
|
|
471
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
472
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
473
|
+
readonly millis: Schema.Int;
|
|
474
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
475
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
476
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
477
|
+
}>]>;
|
|
478
|
+
livenessTickMillis: Schema.Int;
|
|
479
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
480
|
+
readonly childId: Schema.String;
|
|
481
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
482
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
483
|
+
readonly millis: Schema.Int;
|
|
484
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
485
|
+
readonly significant: Schema.Boolean;
|
|
486
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
487
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
488
|
+
}>>;
|
|
489
|
+
}>;
|
|
490
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
491
|
+
readonly childId: Schema.String;
|
|
492
|
+
readonly generation: Schema.Int;
|
|
493
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
494
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
495
|
+
readonly probeFailures: Schema.Int;
|
|
496
|
+
}>>;
|
|
497
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
498
|
+
readonly nextOrdinal: Schema.Int;
|
|
499
|
+
}>;
|
|
500
|
+
readonly commands: Schema.Struct<{
|
|
501
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
502
|
+
readonly childId: Schema.String;
|
|
503
|
+
readonly generation: Schema.Int;
|
|
504
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
505
|
+
readonly millis: Schema.Int;
|
|
506
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
507
|
+
}>>;
|
|
508
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
509
|
+
readonly childId: Schema.String;
|
|
510
|
+
readonly generation: Schema.Int;
|
|
511
|
+
}>>;
|
|
512
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
513
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
514
|
+
readonly childId: Schema.String;
|
|
515
|
+
readonly generation: Schema.Int;
|
|
516
|
+
readonly deadline: Schema.Int;
|
|
517
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
518
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
519
|
+
readonly deadline: Schema.Int;
|
|
520
|
+
}>]>>;
|
|
521
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
522
|
+
readonly requestId: Schema.String;
|
|
523
|
+
readonly childId: Schema.String;
|
|
524
|
+
readonly generation: Schema.Int;
|
|
525
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
526
|
+
readonly requestId: Schema.String;
|
|
527
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
528
|
+
readonly requestId: Schema.String;
|
|
529
|
+
}>]>>;
|
|
530
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
531
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
532
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
533
|
+
readonly cause: Schema.String;
|
|
534
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
535
|
+
readonly code: Schema.Int;
|
|
536
|
+
readonly signal: Schema.String;
|
|
537
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
538
|
+
readonly failedProbes: Schema.Int;
|
|
539
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
540
|
+
readonly waitedMillis: Schema.Int;
|
|
541
|
+
}>]>;
|
|
542
|
+
}>]>;
|
|
543
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
544
|
+
readonly childId: Schema.String;
|
|
545
|
+
readonly generation: Schema.Int;
|
|
546
|
+
}>]>;
|
|
547
|
+
}>>;
|
|
548
|
+
}>;
|
|
549
|
+
}>, {}>;
|
|
550
|
+
declare class StartChildren extends StartChildren_base {
|
|
551
|
+
readonly [DecisionTypeId]: symbol;
|
|
552
|
+
}
|
|
553
|
+
declare const CoolDown_base: Schema.Class<CoolDown, Schema.TaggedStruct<"CoolDown", {
|
|
554
|
+
readonly core: Schema.Struct<{
|
|
555
|
+
readonly policy: Schema.Struct<{
|
|
556
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
557
|
+
intensity: Schema.Int;
|
|
558
|
+
periodMillis: Schema.Int;
|
|
559
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
560
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
561
|
+
readonly millis: Schema.Int;
|
|
562
|
+
}>]>;
|
|
563
|
+
backoff: Schema.Struct<{
|
|
564
|
+
readonly baseMillis: Schema.Int;
|
|
565
|
+
readonly multiplier: Schema.Int;
|
|
566
|
+
readonly capMillis: Schema.Int;
|
|
567
|
+
}>;
|
|
568
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
569
|
+
readonly ceiling: Schema.Int;
|
|
570
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
571
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
572
|
+
readonly millis: Schema.Int;
|
|
573
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
574
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
575
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
576
|
+
}>]>;
|
|
577
|
+
livenessTickMillis: Schema.Int;
|
|
578
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
579
|
+
readonly childId: Schema.String;
|
|
580
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
581
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
582
|
+
readonly millis: Schema.Int;
|
|
583
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
584
|
+
readonly significant: Schema.Boolean;
|
|
585
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
586
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
587
|
+
}>>;
|
|
588
|
+
}>;
|
|
589
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
590
|
+
readonly childId: Schema.String;
|
|
591
|
+
readonly generation: Schema.Int;
|
|
592
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
593
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
594
|
+
readonly probeFailures: Schema.Int;
|
|
595
|
+
}>>;
|
|
596
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
597
|
+
readonly nextOrdinal: Schema.Int;
|
|
598
|
+
}>;
|
|
599
|
+
readonly millis: Schema.Int;
|
|
600
|
+
readonly commands: Schema.Struct<{
|
|
601
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
602
|
+
readonly childId: Schema.String;
|
|
603
|
+
readonly generation: Schema.Int;
|
|
604
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
605
|
+
readonly millis: Schema.Int;
|
|
606
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
607
|
+
}>>;
|
|
608
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
609
|
+
readonly childId: Schema.String;
|
|
610
|
+
readonly generation: Schema.Int;
|
|
611
|
+
}>>;
|
|
612
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
613
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
614
|
+
readonly childId: Schema.String;
|
|
615
|
+
readonly generation: Schema.Int;
|
|
616
|
+
readonly deadline: Schema.Int;
|
|
617
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
618
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
619
|
+
readonly deadline: Schema.Int;
|
|
620
|
+
}>]>>;
|
|
621
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
622
|
+
readonly requestId: Schema.String;
|
|
623
|
+
readonly childId: Schema.String;
|
|
624
|
+
readonly generation: Schema.Int;
|
|
625
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
626
|
+
readonly requestId: Schema.String;
|
|
627
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
628
|
+
readonly requestId: Schema.String;
|
|
629
|
+
}>]>>;
|
|
630
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
631
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
632
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
633
|
+
readonly cause: Schema.String;
|
|
634
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
635
|
+
readonly code: Schema.Int;
|
|
636
|
+
readonly signal: Schema.String;
|
|
637
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
638
|
+
readonly failedProbes: Schema.Int;
|
|
639
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
640
|
+
readonly waitedMillis: Schema.Int;
|
|
641
|
+
}>]>;
|
|
642
|
+
}>]>;
|
|
643
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
644
|
+
readonly childId: Schema.String;
|
|
645
|
+
readonly generation: Schema.Int;
|
|
646
|
+
}>]>;
|
|
647
|
+
}>>;
|
|
648
|
+
}>;
|
|
649
|
+
}>, {}>;
|
|
650
|
+
declare class CoolDown extends CoolDown_base {
|
|
651
|
+
readonly [DecisionTypeId]: symbol;
|
|
652
|
+
}
|
|
653
|
+
declare const StopChildren_base: Schema.Class<StopChildren, Schema.TaggedStruct<"StopChildren", {
|
|
654
|
+
readonly core: Schema.Struct<{
|
|
655
|
+
readonly policy: Schema.Struct<{
|
|
656
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
657
|
+
intensity: Schema.Int;
|
|
658
|
+
periodMillis: Schema.Int;
|
|
659
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
660
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
661
|
+
readonly millis: Schema.Int;
|
|
662
|
+
}>]>;
|
|
663
|
+
backoff: Schema.Struct<{
|
|
664
|
+
readonly baseMillis: Schema.Int;
|
|
665
|
+
readonly multiplier: Schema.Int;
|
|
666
|
+
readonly capMillis: Schema.Int;
|
|
667
|
+
}>;
|
|
668
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
669
|
+
readonly ceiling: Schema.Int;
|
|
670
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
671
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
672
|
+
readonly millis: Schema.Int;
|
|
673
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
674
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
675
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
676
|
+
}>]>;
|
|
677
|
+
livenessTickMillis: Schema.Int;
|
|
678
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
679
|
+
readonly childId: Schema.String;
|
|
680
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
681
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
682
|
+
readonly millis: Schema.Int;
|
|
683
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
684
|
+
readonly significant: Schema.Boolean;
|
|
685
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
686
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
687
|
+
}>>;
|
|
688
|
+
}>;
|
|
689
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
690
|
+
readonly childId: Schema.String;
|
|
691
|
+
readonly generation: Schema.Int;
|
|
692
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
693
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
694
|
+
readonly probeFailures: Schema.Int;
|
|
695
|
+
}>>;
|
|
696
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
697
|
+
readonly nextOrdinal: Schema.Int;
|
|
698
|
+
}>;
|
|
699
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
700
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
701
|
+
readonly cause: Schema.String;
|
|
702
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
703
|
+
readonly code: Schema.Int;
|
|
704
|
+
readonly signal: Schema.String;
|
|
705
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
706
|
+
readonly failedProbes: Schema.Int;
|
|
707
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
708
|
+
readonly waitedMillis: Schema.Int;
|
|
709
|
+
}>]>;
|
|
710
|
+
}>]>;
|
|
711
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
712
|
+
readonly childId: Schema.String;
|
|
713
|
+
readonly generation: Schema.Int;
|
|
714
|
+
}>]>;
|
|
715
|
+
readonly commands: Schema.Struct<{
|
|
716
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
717
|
+
readonly childId: Schema.String;
|
|
718
|
+
readonly generation: Schema.Int;
|
|
719
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
720
|
+
readonly millis: Schema.Int;
|
|
721
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
722
|
+
}>>;
|
|
723
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
724
|
+
readonly childId: Schema.String;
|
|
725
|
+
readonly generation: Schema.Int;
|
|
726
|
+
}>>;
|
|
727
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
728
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
729
|
+
readonly childId: Schema.String;
|
|
730
|
+
readonly generation: Schema.Int;
|
|
731
|
+
readonly deadline: Schema.Int;
|
|
732
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
733
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
734
|
+
readonly deadline: Schema.Int;
|
|
735
|
+
}>]>>;
|
|
736
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
737
|
+
readonly requestId: Schema.String;
|
|
738
|
+
readonly childId: Schema.String;
|
|
739
|
+
readonly generation: Schema.Int;
|
|
740
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
741
|
+
readonly requestId: Schema.String;
|
|
742
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
743
|
+
readonly requestId: Schema.String;
|
|
744
|
+
}>]>>;
|
|
745
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
746
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
747
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
748
|
+
readonly cause: Schema.String;
|
|
749
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
750
|
+
readonly code: Schema.Int;
|
|
751
|
+
readonly signal: Schema.String;
|
|
752
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
753
|
+
readonly failedProbes: Schema.Int;
|
|
754
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
755
|
+
readonly waitedMillis: Schema.Int;
|
|
756
|
+
}>]>;
|
|
757
|
+
}>]>;
|
|
758
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
759
|
+
readonly childId: Schema.String;
|
|
760
|
+
readonly generation: Schema.Int;
|
|
761
|
+
}>]>;
|
|
762
|
+
}>>;
|
|
763
|
+
}>;
|
|
112
764
|
}>, {}>;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
765
|
+
declare class StopChildren extends StopChildren_base {
|
|
766
|
+
readonly [DecisionTypeId]: symbol;
|
|
767
|
+
}
|
|
768
|
+
declare const Terminate_base: Schema.Class<Terminate, Schema.TaggedStruct<"Terminate", {
|
|
769
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
770
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
771
|
+
readonly cause: Schema.String;
|
|
772
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
773
|
+
readonly code: Schema.Int;
|
|
774
|
+
readonly signal: Schema.String;
|
|
775
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
776
|
+
readonly failedProbes: Schema.Int;
|
|
777
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
778
|
+
readonly waitedMillis: Schema.Int;
|
|
779
|
+
}>]>;
|
|
780
|
+
}>]>;
|
|
781
|
+
readonly commands: Schema.Struct<{
|
|
782
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
783
|
+
readonly childId: Schema.String;
|
|
784
|
+
readonly generation: Schema.Int;
|
|
785
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
786
|
+
readonly millis: Schema.Int;
|
|
787
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
788
|
+
}>>;
|
|
789
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
790
|
+
readonly childId: Schema.String;
|
|
791
|
+
readonly generation: Schema.Int;
|
|
792
|
+
}>>;
|
|
793
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
794
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
795
|
+
readonly childId: Schema.String;
|
|
796
|
+
readonly generation: Schema.Int;
|
|
797
|
+
readonly deadline: Schema.Int;
|
|
798
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
799
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
800
|
+
readonly deadline: Schema.Int;
|
|
801
|
+
}>]>>;
|
|
802
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
803
|
+
readonly requestId: Schema.String;
|
|
804
|
+
readonly childId: Schema.String;
|
|
805
|
+
readonly generation: Schema.Int;
|
|
806
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
807
|
+
readonly requestId: Schema.String;
|
|
808
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
809
|
+
readonly requestId: Schema.String;
|
|
810
|
+
}>]>>;
|
|
811
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
812
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
813
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
814
|
+
readonly cause: Schema.String;
|
|
815
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
816
|
+
readonly code: Schema.Int;
|
|
817
|
+
readonly signal: Schema.String;
|
|
818
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
819
|
+
readonly failedProbes: Schema.Int;
|
|
820
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
821
|
+
readonly waitedMillis: Schema.Int;
|
|
822
|
+
}>]>;
|
|
823
|
+
}>]>;
|
|
824
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
825
|
+
readonly childId: Schema.String;
|
|
826
|
+
readonly generation: Schema.Int;
|
|
827
|
+
}>]>;
|
|
828
|
+
}>>;
|
|
829
|
+
}>;
|
|
830
|
+
}>, {}>;
|
|
831
|
+
declare class Terminate extends Terminate_base {
|
|
832
|
+
readonly [DecisionTypeId]: symbol;
|
|
833
|
+
}
|
|
834
|
+
declare const RefuseDynamicStart_base: Schema.Class<RefuseDynamicStart, Schema.TaggedStruct<"RefuseDynamicStart", {
|
|
835
|
+
readonly commands: Schema.Struct<{
|
|
836
|
+
readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
|
|
837
|
+
readonly childId: Schema.String;
|
|
838
|
+
readonly generation: Schema.Int;
|
|
839
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
840
|
+
readonly millis: Schema.Int;
|
|
841
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
842
|
+
}>>;
|
|
843
|
+
readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
|
|
844
|
+
readonly childId: Schema.String;
|
|
845
|
+
readonly generation: Schema.Int;
|
|
846
|
+
}>>;
|
|
847
|
+
readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
|
|
848
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
849
|
+
readonly childId: Schema.String;
|
|
850
|
+
readonly generation: Schema.Int;
|
|
851
|
+
readonly deadline: Schema.Int;
|
|
852
|
+
}>, Schema.TaggedStruct<"ArmSupervisorTimer", {
|
|
853
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
854
|
+
readonly deadline: Schema.Int;
|
|
855
|
+
}>]>>;
|
|
856
|
+
readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
|
|
857
|
+
readonly requestId: Schema.String;
|
|
858
|
+
readonly childId: Schema.String;
|
|
859
|
+
readonly generation: Schema.Int;
|
|
860
|
+
}>, Schema.TaggedStruct<"ReplyStartRefused", {
|
|
861
|
+
readonly requestId: Schema.String;
|
|
862
|
+
}>, Schema.TaggedStruct<"ReplyStopped", {
|
|
863
|
+
readonly requestId: Schema.String;
|
|
864
|
+
}>]>>;
|
|
865
|
+
readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
|
|
866
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
867
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
868
|
+
readonly cause: Schema.String;
|
|
869
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
870
|
+
readonly code: Schema.Int;
|
|
871
|
+
readonly signal: Schema.String;
|
|
872
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
873
|
+
readonly failedProbes: Schema.Int;
|
|
874
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
875
|
+
readonly waitedMillis: Schema.Int;
|
|
876
|
+
}>]>;
|
|
877
|
+
}>]>;
|
|
878
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
879
|
+
readonly childId: Schema.String;
|
|
880
|
+
readonly generation: Schema.Int;
|
|
881
|
+
}>]>;
|
|
882
|
+
}>>;
|
|
883
|
+
}>;
|
|
117
884
|
}>, {}>;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
885
|
+
declare class RefuseDynamicStart extends RefuseDynamicStart_base {
|
|
886
|
+
readonly [DecisionTypeId]: symbol;
|
|
887
|
+
}
|
|
888
|
+
declare const SupervisionDecision: Schema.Union<readonly [typeof Stale, typeof Continue, typeof RestartChildren, typeof StartChildren, typeof CoolDown, typeof StopChildren, typeof Terminate, typeof RefuseDynamicStart]>;
|
|
889
|
+
type SupervisionDecision = typeof SupervisionDecision.Type;
|
|
890
|
+
declare const Running_base: Schema.Class<Running, Schema.TaggedStruct<"Running", {
|
|
891
|
+
readonly core: Schema.Struct<{
|
|
892
|
+
readonly policy: Schema.Struct<{
|
|
893
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
894
|
+
intensity: Schema.Int;
|
|
895
|
+
periodMillis: Schema.Int;
|
|
896
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
897
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
898
|
+
readonly millis: Schema.Int;
|
|
899
|
+
}>]>;
|
|
900
|
+
backoff: Schema.Struct<{
|
|
901
|
+
readonly baseMillis: Schema.Int;
|
|
902
|
+
readonly multiplier: Schema.Int;
|
|
903
|
+
readonly capMillis: Schema.Int;
|
|
904
|
+
}>;
|
|
905
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
906
|
+
readonly ceiling: Schema.Int;
|
|
907
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
908
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
909
|
+
readonly millis: Schema.Int;
|
|
910
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
911
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
912
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
913
|
+
}>]>;
|
|
914
|
+
livenessTickMillis: Schema.Int;
|
|
915
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
916
|
+
readonly childId: Schema.String;
|
|
917
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
918
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
919
|
+
readonly millis: Schema.Int;
|
|
920
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
921
|
+
readonly significant: Schema.Boolean;
|
|
922
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
923
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
924
|
+
}>>;
|
|
925
|
+
}>;
|
|
926
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
927
|
+
readonly childId: Schema.String;
|
|
928
|
+
readonly generation: Schema.Int;
|
|
929
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
930
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
931
|
+
readonly probeFailures: Schema.Int;
|
|
932
|
+
}>>;
|
|
933
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
934
|
+
readonly nextOrdinal: Schema.Int;
|
|
935
|
+
}>;
|
|
936
|
+
}>, {}>;
|
|
937
|
+
declare class Running extends Running_base {
|
|
938
|
+
readonly [StateTypeId]: symbol;
|
|
939
|
+
}
|
|
940
|
+
declare const Restarting_base: Schema.Class<Restarting, Schema.TaggedStruct<"Restarting", {
|
|
941
|
+
readonly core: Schema.Struct<{
|
|
942
|
+
readonly policy: Schema.Struct<{
|
|
943
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
944
|
+
intensity: Schema.Int;
|
|
945
|
+
periodMillis: Schema.Int;
|
|
946
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
947
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
948
|
+
readonly millis: Schema.Int;
|
|
949
|
+
}>]>;
|
|
950
|
+
backoff: Schema.Struct<{
|
|
951
|
+
readonly baseMillis: Schema.Int;
|
|
952
|
+
readonly multiplier: Schema.Int;
|
|
953
|
+
readonly capMillis: Schema.Int;
|
|
954
|
+
}>;
|
|
955
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
956
|
+
readonly ceiling: Schema.Int;
|
|
957
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
958
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
959
|
+
readonly millis: Schema.Int;
|
|
960
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
961
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
962
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
963
|
+
}>]>;
|
|
964
|
+
livenessTickMillis: Schema.Int;
|
|
965
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
966
|
+
readonly childId: Schema.String;
|
|
967
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
968
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
969
|
+
readonly millis: Schema.Int;
|
|
970
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
971
|
+
readonly significant: Schema.Boolean;
|
|
972
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
973
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
974
|
+
}>>;
|
|
975
|
+
}>;
|
|
976
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
977
|
+
readonly childId: Schema.String;
|
|
978
|
+
readonly generation: Schema.Int;
|
|
979
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
980
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
981
|
+
readonly probeFailures: Schema.Int;
|
|
982
|
+
}>>;
|
|
983
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
984
|
+
readonly nextOrdinal: Schema.Int;
|
|
985
|
+
}>;
|
|
986
|
+
readonly pending: Schema.$Array<Schema.Struct<{
|
|
987
|
+
readonly childId: Schema.String;
|
|
988
|
+
readonly generation: Schema.Int;
|
|
989
|
+
}>>;
|
|
123
990
|
}>, {}>;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
991
|
+
declare class Restarting extends Restarting_base {
|
|
992
|
+
readonly [StateTypeId]: symbol;
|
|
993
|
+
}
|
|
994
|
+
declare const CoolingDown_base: Schema.Class<CoolingDown, Schema.TaggedStruct<"CoolingDown", {
|
|
995
|
+
readonly core: Schema.Struct<{
|
|
996
|
+
readonly policy: Schema.Struct<{
|
|
997
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
998
|
+
intensity: Schema.Int;
|
|
999
|
+
periodMillis: Schema.Int;
|
|
1000
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
1001
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
1002
|
+
readonly millis: Schema.Int;
|
|
1003
|
+
}>]>;
|
|
1004
|
+
backoff: Schema.Struct<{
|
|
1005
|
+
readonly baseMillis: Schema.Int;
|
|
1006
|
+
readonly multiplier: Schema.Int;
|
|
1007
|
+
readonly capMillis: Schema.Int;
|
|
1008
|
+
}>;
|
|
1009
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
1010
|
+
readonly ceiling: Schema.Int;
|
|
1011
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
1012
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
1013
|
+
readonly millis: Schema.Int;
|
|
1014
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
1015
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
1016
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
1017
|
+
}>]>;
|
|
1018
|
+
livenessTickMillis: Schema.Int;
|
|
1019
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
1020
|
+
readonly childId: Schema.String;
|
|
1021
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
1022
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
1023
|
+
readonly millis: Schema.Int;
|
|
1024
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
1025
|
+
readonly significant: Schema.Boolean;
|
|
1026
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
1027
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
1028
|
+
}>>;
|
|
1029
|
+
}>;
|
|
1030
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
1031
|
+
readonly childId: Schema.String;
|
|
1032
|
+
readonly generation: Schema.Int;
|
|
1033
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
1034
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
1035
|
+
readonly probeFailures: Schema.Int;
|
|
1036
|
+
}>>;
|
|
1037
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
1038
|
+
readonly nextOrdinal: Schema.Int;
|
|
1039
|
+
}>;
|
|
1040
|
+
readonly millis: Schema.Int;
|
|
1041
|
+
}>, {}>;
|
|
1042
|
+
declare class CoolingDown extends CoolingDown_base {
|
|
1043
|
+
readonly [StateTypeId]: symbol;
|
|
1044
|
+
}
|
|
1045
|
+
declare const ShuttingDown_base: Schema.Class<ShuttingDown, Schema.TaggedStruct<"ShuttingDown", {
|
|
1046
|
+
readonly core: Schema.Struct<{
|
|
1047
|
+
readonly policy: Schema.Struct<{
|
|
1048
|
+
strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
|
|
1049
|
+
intensity: Schema.Int;
|
|
1050
|
+
periodMillis: Schema.Int;
|
|
1051
|
+
autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
|
|
1052
|
+
coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
|
|
1053
|
+
readonly millis: Schema.Int;
|
|
1054
|
+
}>]>;
|
|
1055
|
+
backoff: Schema.Struct<{
|
|
1056
|
+
readonly baseMillis: Schema.Int;
|
|
1057
|
+
readonly multiplier: Schema.Int;
|
|
1058
|
+
readonly capMillis: Schema.Int;
|
|
1059
|
+
}>;
|
|
1060
|
+
dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
|
|
1061
|
+
readonly ceiling: Schema.Int;
|
|
1062
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
1063
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
1064
|
+
readonly millis: Schema.Int;
|
|
1065
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
1066
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
1067
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
1068
|
+
}>]>;
|
|
1069
|
+
livenessTickMillis: Schema.Int;
|
|
1070
|
+
childDeclarations: Schema.$Array<Schema.Struct<{
|
|
1071
|
+
readonly childId: Schema.String;
|
|
1072
|
+
readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
|
|
1073
|
+
readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
|
|
1074
|
+
readonly millis: Schema.Int;
|
|
1075
|
+
}>, Schema.TaggedStruct<"Infinity", {}>]>;
|
|
1076
|
+
readonly significant: Schema.Boolean;
|
|
1077
|
+
readonly startTimeoutMillis: Schema.Int;
|
|
1078
|
+
readonly probeFailureThreshold: Schema.Int;
|
|
1079
|
+
}>>;
|
|
1080
|
+
}>;
|
|
1081
|
+
readonly children: Schema.$Array<Schema.Struct<{
|
|
1082
|
+
readonly childId: Schema.String;
|
|
1083
|
+
readonly generation: Schema.Int;
|
|
1084
|
+
readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
|
|
1085
|
+
readonly consecutiveRestarts: Schema.Int;
|
|
1086
|
+
readonly probeFailures: Schema.Int;
|
|
1087
|
+
}>>;
|
|
1088
|
+
readonly restartStamps: Schema.$Array<Schema.Int>;
|
|
1089
|
+
readonly nextOrdinal: Schema.Int;
|
|
1090
|
+
}>;
|
|
1091
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
1092
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
1093
|
+
readonly cause: Schema.String;
|
|
1094
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
1095
|
+
readonly code: Schema.Int;
|
|
1096
|
+
readonly signal: Schema.String;
|
|
1097
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
1098
|
+
readonly failedProbes: Schema.Int;
|
|
1099
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
1100
|
+
readonly waitedMillis: Schema.Int;
|
|
1101
|
+
}>]>;
|
|
1102
|
+
}>]>;
|
|
1103
|
+
readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
|
|
1104
|
+
readonly childId: Schema.String;
|
|
1105
|
+
readonly generation: Schema.Int;
|
|
1106
|
+
}>]>;
|
|
1107
|
+
}>, {}>;
|
|
1108
|
+
declare class ShuttingDown extends ShuttingDown_base {
|
|
1109
|
+
readonly [StateTypeId]: symbol;
|
|
1110
|
+
}
|
|
1111
|
+
declare const Terminated_base: Schema.Class<Terminated, Schema.TaggedStruct<"Terminated", {
|
|
1112
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
1113
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
1114
|
+
readonly cause: Schema.String;
|
|
1115
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
1116
|
+
readonly code: Schema.Int;
|
|
1117
|
+
readonly signal: Schema.String;
|
|
1118
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
1119
|
+
readonly failedProbes: Schema.Int;
|
|
1120
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
1121
|
+
readonly waitedMillis: Schema.Int;
|
|
1122
|
+
}>]>;
|
|
1123
|
+
}>]>;
|
|
1124
|
+
}>, {}>;
|
|
1125
|
+
declare class Terminated extends Terminated_base {
|
|
1126
|
+
readonly [StateTypeId]: symbol;
|
|
1127
|
+
}
|
|
1128
|
+
declare const SupervisorState: Schema.Union<readonly [typeof Running, typeof Restarting, typeof CoolingDown, typeof ShuttingDown, typeof Terminated]>;
|
|
1129
|
+
type SupervisorState = typeof SupervisorState.Type;
|
|
127
1130
|
//#endregion
|
|
128
|
-
//#region src/
|
|
129
|
-
|
|
130
|
-
readonly
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
1131
|
+
//#region src/kernel/SupervisionEvent.schema.d.ts
|
|
1132
|
+
declare const SupervisionEvent: Schema.Union<readonly [Schema.TaggedStruct<"SupervisorStarted", {
|
|
1133
|
+
readonly at: Schema.Int;
|
|
1134
|
+
}>, Schema.TaggedStruct<"ChildStarted", {
|
|
1135
|
+
readonly at: Schema.Int;
|
|
1136
|
+
readonly childId: Schema.String;
|
|
1137
|
+
readonly generation: Schema.Int;
|
|
1138
|
+
}>, Schema.TaggedStruct<"ChildReady", {
|
|
1139
|
+
readonly at: Schema.Int;
|
|
1140
|
+
readonly childId: Schema.String;
|
|
1141
|
+
readonly generation: Schema.Int;
|
|
1142
|
+
}>, Schema.TaggedStruct<"ChildTerminated", {
|
|
1143
|
+
readonly at: Schema.Int;
|
|
1144
|
+
readonly childId: Schema.String;
|
|
1145
|
+
readonly generation: Schema.Int;
|
|
1146
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
1147
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
1148
|
+
readonly cause: Schema.String;
|
|
1149
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
1150
|
+
readonly code: Schema.Int;
|
|
1151
|
+
readonly signal: Schema.String;
|
|
1152
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
1153
|
+
readonly failedProbes: Schema.Int;
|
|
1154
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
1155
|
+
readonly waitedMillis: Schema.Int;
|
|
1156
|
+
}>]>;
|
|
1157
|
+
}>]>;
|
|
1158
|
+
}>, Schema.TaggedStruct<"ChildStopped", {
|
|
1159
|
+
readonly at: Schema.Int;
|
|
1160
|
+
readonly childId: Schema.String;
|
|
1161
|
+
readonly generation: Schema.Int;
|
|
1162
|
+
}>, Schema.TaggedStruct<"ProbeResult", {
|
|
1163
|
+
readonly at: Schema.Int;
|
|
1164
|
+
readonly childId: Schema.String;
|
|
1165
|
+
readonly generation: Schema.Int;
|
|
1166
|
+
readonly alive: Schema.Boolean;
|
|
1167
|
+
}>, Schema.TaggedStruct<"TimerElapsed", {
|
|
1168
|
+
readonly at: Schema.Int;
|
|
1169
|
+
readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
|
|
1170
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"ChildTimer", {
|
|
1171
|
+
readonly childId: Schema.String;
|
|
1172
|
+
readonly generation: Schema.Int;
|
|
1173
|
+
}>, Schema.TaggedStruct<"SupervisorTimer", {}>]>;
|
|
1174
|
+
}>, Schema.TaggedStruct<"DynamicStartRequested", {
|
|
1175
|
+
readonly at: Schema.Int;
|
|
1176
|
+
readonly requestId: Schema.String;
|
|
1177
|
+
}>, Schema.TaggedStruct<"DynamicStopRequested", {
|
|
1178
|
+
readonly at: Schema.Int;
|
|
1179
|
+
readonly requestId: Schema.String;
|
|
1180
|
+
readonly childId: Schema.String;
|
|
1181
|
+
readonly generation: Schema.Int;
|
|
1182
|
+
}>, Schema.TaggedStruct<"ShutdownRequested", {
|
|
1183
|
+
readonly at: Schema.Int;
|
|
1184
|
+
readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
|
|
1185
|
+
readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
|
|
1186
|
+
readonly cause: Schema.String;
|
|
1187
|
+
}>, Schema.TaggedStruct<"ExitReport", {
|
|
1188
|
+
readonly code: Schema.Int;
|
|
1189
|
+
readonly signal: Schema.String;
|
|
1190
|
+
}>, Schema.TaggedStruct<"InferredReport", {
|
|
1191
|
+
readonly failedProbes: Schema.Int;
|
|
1192
|
+
}>, Schema.TaggedStruct<"DeadlineMissed", {
|
|
1193
|
+
readonly waitedMillis: Schema.Int;
|
|
1194
|
+
}>]>;
|
|
1195
|
+
}>]>;
|
|
1196
|
+
}>]>;
|
|
1197
|
+
type SupervisionEvent = typeof SupervisionEvent.Type;
|
|
136
1198
|
//#endregion
|
|
137
|
-
//#region src/
|
|
1199
|
+
//#region src/kernel/SupervisionLimits.schema.d.ts
|
|
1200
|
+
/** How many times a child incarnation has been replaced: any non-negative safe integer. Generation stays small so generation+1 stays in range. */
|
|
1201
|
+
declare const Generation: Schema.Int;
|
|
1202
|
+
type Generation = typeof Generation.Type;
|
|
1203
|
+
declare const ChildId: Schema.String;
|
|
1204
|
+
type ChildId = typeof ChildId.Type;
|
|
1205
|
+
//#endregion
|
|
1206
|
+
//#region src/Supervisor/bound-child.d.ts
|
|
138
1207
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* and
|
|
1208
|
+
* A child bound to the medium that interprets its program, and to the services
|
|
1209
|
+
* that medium needs (KTD9, R15, R17, R18). Every operation already runs in the
|
|
1210
|
+
* context the supervisor acquired, so the handle stores one bound child per
|
|
1211
|
+
* declared and dynamic child, and the executor never names a medium.
|
|
143
1212
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
readonly
|
|
154
|
-
}
|
|
155
|
-
export type SubscriptionLoopTag = typeof SubscriptionLoopTag;
|
|
1213
|
+
interface BoundChild {
|
|
1214
|
+
/**
|
|
1215
|
+
* Starts one incarnation in a fresh child scope. A medium whose `start` fails
|
|
1216
|
+
* produces an abnormal `TerminationReason` instead of a failure, so nothing
|
|
1217
|
+
* downstream claims the child started (R15, KTD8).
|
|
1218
|
+
*/
|
|
1219
|
+
readonly start: Effect.Effect<Started, TerminationReason, Scope.Scope>;
|
|
1220
|
+
readonly report: (evidence: Started) => Effect.Effect<TerminationReason, never, never>;
|
|
1221
|
+
readonly probe: (evidence: Started) => Effect.Effect<boolean, never, never>;
|
|
1222
|
+
readonly stop: (evidence: Started, mode: ShutdownMode) => Effect.Effect<Stopped, never, never>;
|
|
1223
|
+
}
|
|
156
1224
|
//#endregion
|
|
157
|
-
//#region src/
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
acquireRetryBackoff: Schedule.Schedule<Duration.Duration>;
|
|
167
|
-
};
|
|
168
|
-
export interface CommonOpts<L extends LockConfig> {
|
|
169
|
-
readonly name: string;
|
|
170
|
-
readonly child?: ChildPolicyConfig;
|
|
171
|
-
readonly tick: TickPolicyConfig;
|
|
172
|
-
readonly tickHooks?: TickPolicyHooks;
|
|
173
|
-
readonly lock: L;
|
|
174
|
-
}
|
|
175
|
-
export type PollOpts<A, E, R, L extends LockConfig> = CommonOpts<L> & {
|
|
176
|
-
readonly interval: Duration.Input;
|
|
177
|
-
} & ({
|
|
178
|
-
readonly prereq?: undefined;
|
|
179
|
-
readonly work: Effect.Effect<A, E, R>;
|
|
180
|
-
} | {
|
|
181
|
-
readonly prereq: Effect.Effect<Option.Option<A>, E, R>;
|
|
182
|
-
readonly work: (data: A) => Effect.Effect<void, E, R>;
|
|
183
|
-
});
|
|
184
|
-
export interface TickPolicyHooks<RetrySchedule = unknown> {
|
|
185
|
-
readonly spanAttributes?: Effect.Effect<Record<string, string | number | boolean>>;
|
|
186
|
-
readonly innerRetry?: Schedule.Schedule<RetrySchedule>;
|
|
187
|
-
readonly trackDuration?: Metric.Histogram<Duration.Duration>;
|
|
188
|
-
}
|
|
189
|
-
export interface ReporterPolicyHooks {
|
|
190
|
-
readonly onRestart?: (cause: Cause.Cause<never>) => Effect.Effect<void>;
|
|
191
|
-
readonly onExhausted?: (cause: Cause.Cause<never>) => Effect.Effect<void>;
|
|
192
|
-
}
|
|
193
|
-
export interface PollLoop<E, R> extends PollLoopTag {
|
|
194
|
-
readonly gate: Effect.Effect<Option.Option<Effect.Effect<void, E, R>>, E, R>;
|
|
195
|
-
readonly interval: Duration.Input;
|
|
196
|
-
}
|
|
197
|
-
export interface StreamLoop<E, R, A = unknown> extends StreamLoopTag {
|
|
198
|
-
readonly stream: Stream.Stream<A, E, R>;
|
|
199
|
-
}
|
|
200
|
-
export interface SubscriptionLoop<E, R> extends SubscriptionLoopTag {
|
|
201
|
-
readonly acquire: Effect.Effect<void, E, R>;
|
|
202
|
-
}
|
|
203
|
-
export type LoopShape<E, R> = PollLoop<E, R> | StreamLoop<E, R> | SubscriptionLoop<E, R>;
|
|
204
|
-
export interface Worker<E, R, L extends LockConfig = LockConfig> {
|
|
205
|
-
readonly [WorkerTypeId]: WorkerTypeId;
|
|
206
|
-
readonly name: string;
|
|
207
|
-
readonly loop: LoopShape<E, R>;
|
|
208
|
-
readonly child: ChildPolicyConfig;
|
|
209
|
-
readonly tick: TickPolicyConfig;
|
|
210
|
-
readonly tickHooks: TickPolicyHooks;
|
|
211
|
-
readonly lock: L;
|
|
212
|
-
}
|
|
213
|
-
export interface Supervisor<E, R, L extends LockConfig = LockConfig> {
|
|
214
|
-
readonly [SupervisorTypeId]: SupervisorTypeId;
|
|
215
|
-
readonly name: string;
|
|
216
|
-
readonly strategy: 'one_for_one' | 'one_for_all' | 'rest_for_one';
|
|
217
|
-
readonly children: readonly (Worker<E, R> | Supervisor<E, R>)[];
|
|
218
|
-
readonly supervision: Effect.Effect<SupervisionPolicy>;
|
|
219
|
-
readonly lock: L;
|
|
220
|
-
readonly reporter: ReporterPolicyHooks;
|
|
221
|
-
}
|
|
222
|
-
export interface DynamicSpec<E, R, Args> {
|
|
223
|
-
readonly [DynamicSpecTypeId]: DynamicSpecTypeId;
|
|
224
|
-
readonly name: string;
|
|
225
|
-
readonly child: (args: Args) => Worker<E, R>;
|
|
226
|
-
readonly maxChildren: MaxChildren;
|
|
1225
|
+
//#region src/Supervisor/running-supervisor.handle.d.ts
|
|
1226
|
+
/** Brands a running supervisor handle. */
|
|
1227
|
+
declare const TypeId: unique symbol;
|
|
1228
|
+
/** The running supervisor brand. */
|
|
1229
|
+
type TypeId = typeof TypeId;
|
|
1230
|
+
/** One kernel step as observed: the decoded event and the decision it produced. */
|
|
1231
|
+
interface TraceEntry {
|
|
1232
|
+
readonly event: SupervisionEvent;
|
|
1233
|
+
readonly decision: typeof SupervisionDecision.Encoded;
|
|
227
1234
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
readonly
|
|
231
|
-
readonly
|
|
232
|
-
readonly
|
|
1235
|
+
/** A dynamic start the supervisor accepted, naming the child it allocated. */
|
|
1236
|
+
interface DynamicStartAccepted {
|
|
1237
|
+
readonly outcome: 'accepted';
|
|
1238
|
+
readonly childId: ChildId;
|
|
1239
|
+
readonly generation: Generation;
|
|
233
1240
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
readonly
|
|
237
|
-
readonly cooldown: Duration.Input;
|
|
1241
|
+
/** A dynamic start the supervisor refused (ceiling reached, or not running). */
|
|
1242
|
+
interface DynamicStartRefused {
|
|
1243
|
+
readonly outcome: 'refused';
|
|
238
1244
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
readonly
|
|
244
|
-
readonly reporter?: ReporterPolicyHooks;
|
|
1245
|
+
/** The answer to a dynamic start. */
|
|
1246
|
+
type DynamicStartOutcome = DynamicStartAccepted | DynamicStartRefused;
|
|
1247
|
+
/** A dynamic stop that removed the child. */
|
|
1248
|
+
interface DynamicStopDone {
|
|
1249
|
+
readonly outcome: 'stopped';
|
|
245
1250
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
1251
|
+
/** A dynamic stop that named no current incarnation. */
|
|
1252
|
+
interface DynamicStopMissed {
|
|
1253
|
+
readonly outcome: 'missed';
|
|
1254
|
+
}
|
|
1255
|
+
/** The answer to a dynamic stop. */
|
|
1256
|
+
type DynamicStopOutcome = DynamicStopDone | DynamicStopMissed;
|
|
1257
|
+
/** Any dynamic answer, as the reply table stores it. */
|
|
1258
|
+
type DynamicOutcome = DynamicStartOutcome | DynamicStopOutcome;
|
|
1259
|
+
interface SupervisorSlot {
|
|
1260
|
+
readonly state: Ref.Ref<SupervisorState>;
|
|
1261
|
+
readonly mailbox: Queue.Queue<SupervisionEvent>;
|
|
1262
|
+
readonly trace: PubSub.PubSub<TraceEntry>;
|
|
1263
|
+
readonly evidence: Ref.Ref<HashMap.HashMap<string, Started>>;
|
|
1264
|
+
readonly replies: Ref.Ref<HashMap.HashMap<string, Deferred.Deferred<DynamicOutcome>>>;
|
|
1265
|
+
readonly boundChildren: Ref.Ref<HashMap.HashMap<ChildId, BoundChild>>;
|
|
1266
|
+
readonly pending: Ref.Ref<HashMap.HashMap<string, BoundChild>>;
|
|
1267
|
+
readonly requests: Ref.Ref<number>;
|
|
1268
|
+
readonly terminated: Deferred.Deferred<void, SupervisorTerminated>;
|
|
1269
|
+
readonly scope: Scope.Scope;
|
|
1270
|
+
readonly context: Context.Context<Scope.Scope>;
|
|
1271
|
+
readonly fiber: Medium<FiberProgram, never, Scope.Scope>;
|
|
1272
|
+
}
|
|
1273
|
+
declare const RunningSupervisorDef: Handle.Definition<typeof TypeId, {
|
|
1274
|
+
readonly name: string;
|
|
1275
|
+
}, SupervisorSlot, never>;
|
|
251
1276
|
/**
|
|
252
|
-
*
|
|
253
|
-
* the
|
|
254
|
-
* supervisor body via the lock binding. The body itself only ever sees the service
|
|
255
|
-
* values.
|
|
1277
|
+
* A running supervisor. Its state lives in the handle's slot, never in a module
|
|
1278
|
+
* registry; the only public operations are the functions exported beside it.
|
|
256
1279
|
*/
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
1280
|
+
type RunningSupervisor = Handle.Of<typeof RunningSupervisorDef>;
|
|
1281
|
+
/** Whether a value is a running supervisor handle. */
|
|
1282
|
+
declare const isRunningSupervisor: (u: unknown) => u is Handle.Handle<typeof TypeId, {
|
|
1283
|
+
readonly name: string;
|
|
1284
|
+
}, SupervisorSlot, never>;
|
|
260
1285
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* entry point never sees the tag. A worker whose lock is `{ mode: 'none' }`
|
|
264
|
-
* takes no lock at all.
|
|
1286
|
+
* The kernel trace: every step's decoded event and decision, in mailbox order,
|
|
1287
|
+
* from the moment the stream is subscribed.
|
|
265
1288
|
*/
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
1289
|
+
declare const traceOf: (self: RunningSupervisor) => Stream.Stream<TraceEntry>;
|
|
1290
|
+
/** The supervisor's current phase and children, as the kernel last folded them. */
|
|
1291
|
+
declare const statusOf: (self: RunningSupervisor) => Effect.Effect<SupervisorState>;
|
|
1292
|
+
/** Completes once the supervisor has terminated; fails when it gave up. */
|
|
1293
|
+
declare const awaitTerminated: (self: RunningSupervisor) => Effect.Effect<void, SupervisorTerminated>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Asks the supervisor to shut down and waits until it has terminated: children stop
|
|
1296
|
+
* in reverse start order through their media before this completes.
|
|
1297
|
+
*/
|
|
1298
|
+
declare const shutdown: (self: RunningSupervisor) => Effect.Effect<void, SupervisorTerminated>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Starts a dynamic child running `program`. The supervisor allocates its id and
|
|
1301
|
+
* answers `accepted` with that id, or `refused` at the declared ceiling.
|
|
1302
|
+
*/
|
|
1303
|
+
declare const startChild: {
|
|
1304
|
+
(program: FiberProgram): (self: RunningSupervisor) => Effect.Effect<DynamicOutcome, SupervisorTerminated>;
|
|
1305
|
+
(self: RunningSupervisor, program: FiberProgram): Effect.Effect<DynamicOutcome, SupervisorTerminated>;
|
|
1306
|
+
};
|
|
1307
|
+
/**
|
|
1308
|
+
* Stops the dynamic child's named incarnation and removes it. Answers `stopped`, or
|
|
1309
|
+
* `missed` when that incarnation is no longer current.
|
|
1310
|
+
*/
|
|
1311
|
+
declare const stopChild: {
|
|
1312
|
+
(childId: ChildId, generation: Generation): (self: RunningSupervisor) => Effect.Effect<DynamicOutcome, SupervisorTerminated>;
|
|
1313
|
+
(self: RunningSupervisor, childId: ChildId, generation: Generation): Effect.Effect<DynamicOutcome, SupervisorTerminated>;
|
|
271
1314
|
};
|
|
272
1315
|
//#endregion
|
|
273
|
-
//#region src/
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
1316
|
+
//#region src/Supervisor/Supervisor.d.ts
|
|
1317
|
+
declare const SpecTypeId: unique symbol;
|
|
1318
|
+
type SpecTypeId = typeof SpecTypeId;
|
|
1319
|
+
/** A fiber-hosted child: a bare effect, a function of `ready`, or a nested spec. */
|
|
1320
|
+
type FiberChild<R = never> = BareFiberProgram | ((ready: Effect.Effect<void>) => Effect.Effect<void, SupervisorTerminated, Scope.Scope | R>) | SupervisorSpec<R>;
|
|
1321
|
+
/** Any child program, on any medium. */
|
|
1322
|
+
type ChildProgram<R = never> = BareFiberProgram | FiberProgram | SupervisorSpec<R>;
|
|
1323
|
+
/**
|
|
1324
|
+
* A child declared against a medium port, or against the default fiber medium
|
|
1325
|
+
* (KTD9, R17, R18). Its `binding` resolves the medium from context at
|
|
1326
|
+
* acquisition, so the same declaration runs on any medium.
|
|
1327
|
+
*/
|
|
1328
|
+
interface ChildSpec<R = never> extends Pipeable {
|
|
1329
|
+
readonly childId: ChildId;
|
|
1330
|
+
readonly declaration: ChildDeclaration;
|
|
1331
|
+
readonly binding: Effect.Effect<BoundChild, never, Scope.Scope | R>;
|
|
1332
|
+
}
|
|
1333
|
+
interface Binding<R> {
|
|
1334
|
+
readonly declaration: ChildDeclaration;
|
|
1335
|
+
readonly binding: Effect.Effect<BoundChild, never, Scope.Scope | R>;
|
|
1336
|
+
}
|
|
1337
|
+
interface SpecParts<R> {
|
|
1338
|
+
readonly name: string;
|
|
1339
|
+
readonly strategy: RestartStrategy;
|
|
1340
|
+
readonly intensity: number;
|
|
1341
|
+
readonly periodMillis: number;
|
|
1342
|
+
readonly autoShutdown: AutoShutdown;
|
|
1343
|
+
readonly coolDownMillis: number | undefined;
|
|
1344
|
+
readonly backoff: BackoffSchedule;
|
|
1345
|
+
readonly livenessTickMillis: number;
|
|
1346
|
+
readonly declarations: ReadonlyArray<ChildDeclaration>;
|
|
1347
|
+
readonly bindings: ReadonlyArray<Binding<R>>;
|
|
1348
|
+
readonly dynamic: DynamicKind;
|
|
278
1349
|
}
|
|
279
1350
|
/**
|
|
280
|
-
*
|
|
1351
|
+
* A supervision tree (KTD11). `R` is the environment its children need beyond
|
|
1352
|
+
* the supervisor's own scope: the ports they are bound to and the media they
|
|
1353
|
+
* run on (R17, R18).
|
|
281
1354
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
1355
|
+
interface SupervisorSpec<R = never> extends Pipeable, SpecParts<R> {
|
|
1356
|
+
readonly [SpecTypeId]: typeof SpecTypeId;
|
|
1357
|
+
readonly scoped: Effect.Effect<RunningSupervisor, never, Scope.Scope | R>;
|
|
1358
|
+
readonly layer: Layer.Layer<never, never, Exclude<R, Scope.Scope>>;
|
|
1359
|
+
}
|
|
1360
|
+
declare const isSupervisorSpec: (value: unknown) => value is SupervisorSpec<never>;
|
|
1361
|
+
declare const make: (name: string) => SupervisorSpec<never>;
|
|
1362
|
+
declare const strategy: {
|
|
1363
|
+
(strategy: RestartStrategy): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1364
|
+
<R>(self: SupervisorSpec<R>, strategy: RestartStrategy): SupervisorSpec<R>;
|
|
285
1365
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region src/SupervisionLeader.d.ts
|
|
291
|
-
export declare const LeaderConfig: Context.Reference<SupervisionConfig>;
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region src/SupervisionTask.d.ts
|
|
294
|
-
export declare const TaskConfig: Context.Reference<SupervisionConfig>;
|
|
295
|
-
//#endregion
|
|
296
|
-
//#region src/SupervisionWorker.d.ts
|
|
297
|
-
export declare const WorkerConfig: Context.Reference<SupervisionConfig>;
|
|
298
|
-
//#endregion
|
|
299
|
-
//#region src/mod.d.ts
|
|
300
|
-
export declare const poll: <A, E, R, L extends LockConfig>(opts: PollOpts<A, E, R, L>) => Worker<E, R, L>;
|
|
301
|
-
export declare const stream: <A, E, R, L extends LockConfig>(opts: CommonOpts<L> & {
|
|
302
|
-
readonly stream: Stream.Stream<A, E, R>;
|
|
303
|
-
}) => Worker<E, R, L>;
|
|
304
|
-
export declare const subscription: <A, E, R, L extends LockConfig>(opts: CommonOpts<L> & {
|
|
305
|
-
readonly acquire: Effect.Effect<A, E, R>;
|
|
306
|
-
}) => Worker<E, R, L>;
|
|
307
|
-
export declare const Daemon: {
|
|
308
|
-
readonly poll: typeof poll;
|
|
309
|
-
readonly stream: typeof stream;
|
|
310
|
-
readonly subscription: typeof subscription;
|
|
1366
|
+
declare const intensity: {
|
|
1367
|
+
(intensity: number, periodMillis: number): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1368
|
+
<R>(self: SupervisorSpec<R>, intensity: number, periodMillis: number): SupervisorSpec<R>;
|
|
311
1369
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
mode: 'none';
|
|
316
|
-
}>): Effect.Effect<DaemonHealth, never, R | import("effect/Scope").Scope>;
|
|
317
|
-
<E, R>(w: Worker<E, R, LockConfig>): Effect.Effect<DaemonHealth, never, R | LeaderLock | import("effect/Scope").Scope>;
|
|
318
|
-
};
|
|
319
|
-
readonly supervisor: typeof supervisor;
|
|
320
|
-
readonly dynamic: typeof dynamic$1;
|
|
1370
|
+
declare const autoShutdown: {
|
|
1371
|
+
(autoShutdown: AutoShutdown): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1372
|
+
<R>(self: SupervisorSpec<R>, autoShutdown: AutoShutdown): SupervisorSpec<R>;
|
|
321
1373
|
};
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
export declare const Supervision: {
|
|
326
|
-
readonly leader: typeof leader;
|
|
327
|
-
readonly worker: typeof supervision;
|
|
328
|
-
readonly task: typeof task;
|
|
329
|
-
readonly custom: typeof custom;
|
|
1374
|
+
declare const coolDown: {
|
|
1375
|
+
(millis: number): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1376
|
+
<R>(self: SupervisorSpec<R>, millis: number): SupervisorSpec<R>;
|
|
330
1377
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
1378
|
+
declare const backoff: {
|
|
1379
|
+
(schedule: BackoffSchedule): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1380
|
+
<R>(self: SupervisorSpec<R>, schedule: BackoffSchedule): SupervisorSpec<R>;
|
|
1381
|
+
};
|
|
1382
|
+
declare const livenessTick: {
|
|
1383
|
+
(millis: number): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1384
|
+
<R>(self: SupervisorSpec<R>, millis: number): SupervisorSpec<R>;
|
|
1385
|
+
};
|
|
1386
|
+
interface DynamicOptions extends Omit<ChildOptions, 'significant'> {
|
|
1387
|
+
readonly ceiling: number;
|
|
1388
|
+
}
|
|
1389
|
+
declare const dynamic: {
|
|
1390
|
+
(options: DynamicOptions): <R>(self: SupervisorSpec<R>) => SupervisorSpec<R>;
|
|
1391
|
+
<R>(self: SupervisorSpec<R>, options: DynamicOptions): SupervisorSpec<R>;
|
|
1392
|
+
};
|
|
1393
|
+
interface ChildOptions {
|
|
1394
|
+
readonly restartType?: ChildDeclaration['restartType'];
|
|
1395
|
+
readonly shutdown?: ChildDeclaration['shutdown'];
|
|
1396
|
+
readonly significant?: boolean;
|
|
1397
|
+
readonly startTimeoutMillis?: number;
|
|
1398
|
+
}
|
|
1399
|
+
declare const childSpecMake: <R = never>(childId: ChildId, program: FiberChild<R>, options?: ChildOptions) => ChildSpec<R>;
|
|
1400
|
+
declare const childSpecOn: <Program, StartError, R = never>(port: Context.Service<MediumPortShape<Program, StartError, Scope.Scope | R>, MediumPortShape<Program, StartError, Scope.Scope | R>>) => (childId: ChildId, program: Program, options?: ChildOptions) => ChildSpec<MediumPortShape<Program, StartError, Scope.Scope | R> | R>;
|
|
1401
|
+
/**
|
|
1402
|
+
* The two ways to declare a child: `make`, which binds to the fiber medium (and
|
|
1403
|
+
* to the `FiberMedium` port when one is provided), and `on`, which binds to a
|
|
1404
|
+
* named medium port (KTD9).
|
|
1405
|
+
*/
|
|
1406
|
+
declare const ChildSpecs: {
|
|
1407
|
+
readonly make: typeof childSpecMake;
|
|
1408
|
+
readonly on: typeof childSpecOn;
|
|
1409
|
+
};
|
|
1410
|
+
declare const children: {
|
|
1411
|
+
<R>(specs: ReadonlyArray<ChildSpec<R>>): <R2>(self: SupervisorSpec<R2>) => SupervisorSpec<R | R2>;
|
|
1412
|
+
<R2, R>(self: SupervisorSpec<R2>, specs: ReadonlyArray<ChildSpec<R>>): SupervisorSpec<R | R2>;
|
|
1413
|
+
};
|
|
1414
|
+
declare const child: {
|
|
1415
|
+
<R>(childId: ChildId, program: FiberChild<R>, options?: ChildOptions): <R2>(self: SupervisorSpec<R2>) => SupervisorSpec<R | R2>;
|
|
1416
|
+
<R2, R>(self: SupervisorSpec<R2>, childId: ChildId, program: FiberChild<R>, options?: ChildOptions): SupervisorSpec<R | R2>;
|
|
1417
|
+
};
|
|
1418
|
+
declare namespace mod_d_exports {
|
|
1419
|
+
export { BareFiberProgram, ChildOptions, ChildProgram, ChildSpec, ChildSpecs, DynamicOptions, DynamicOutcome, DynamicStartAccepted, DynamicStartOutcome, DynamicStartRefused, DynamicStopDone, DynamicStopMissed, DynamicStopOutcome, FiberChild, FiberMedium_d_exports as FiberMedium, FiberProgram, Medium_d_exports as Medium, RunningSupervisor, SpecTypeId, SupervisorSpec, SupervisorTerminated, TraceEntry, TypeId, autoShutdown, awaitTerminated, backoff, child, children, coolDown, dynamic, intensity, isRunningSupervisor, isSupervisorSpec, livenessTick, make, readyOnStart, shutdown, startChild, statusOf, stopChild, strategy, traceOf };
|
|
1420
|
+
}
|
|
339
1421
|
//#endregion
|
|
340
|
-
export
|
|
1422
|
+
export { mod_d_exports as Supervisor };
|