@mark1russell7/harness 0.11.2 → 0.11.3
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/README.md +38 -7
- package/build/cell-BmSnJJtn.d.ts +993 -0
- package/build/image-Q_fs3rCC.js +410 -0
- package/build/image-Q_fs3rCC.js.map +1 -0
- package/build/index.d.ts +117 -945
- package/build/index.js +21 -192
- package/build/index.js.map +1 -1
- package/build/schema.d.ts +19 -0
- package/build/schema.js +56 -0
- package/build/schema.js.map +1 -0
- package/image/pg/client-pg.mjs +4 -0
- package/package.json +5 -1
package/build/index.d.ts
CHANGED
|
@@ -1,930 +1,6 @@
|
|
|
1
|
+
import { $ as isHopPlace, A as Recovers, B as RunPart, C as Observer, D as ProxyHop, E as ProbeEvent, F as RequestPrediction, G as ShippedImage, H as SentinelEvent, I as RouterHop, J as Subject, K as Stage, L as RttRange, M as ReplicaSet, N as ReplicaSetStage, O as ProxyTime, P as Replies, Q as WsProbe, R as Run, S as MiddleboxForm, T as Prediction, U as SentinelStage, V as RunTopology, W as Shipped, X as Topology, Y as Target, Z as Toxic, _ as ImageSource, a as DriverBand, b as MiddleboxEvent, c as FaultPlace, d as GroupPrediction, et as latestEndOf, f as GroupRole, g as HttpProbe, h as HopPlace, i as ClientImage, j as Reference, k as Reconnects, l as Group, m as Hop, n as Cell, o as DriverStep, p as HarnessImage, q as StageBand, r as Client, s as Fault, t as BuildImage, u as GroupPlace, v as KernelRecord, w as PinnedImage, x as MiddleboxExpectation, y as LineMatch, z as RunGroup } from "./cell-BmSnJJtn.js";
|
|
1
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
2
|
-
import { KernelRecord } from "@mark1russell7/prober";
|
|
3
3
|
import "testcontainers";
|
|
4
|
-
//#region src/cell.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* A fault is a failure that the harness injects, by the name of its manifestation. Each name is
|
|
7
|
-
* the last segment of the identifier of the manifestation in the corpus:
|
|
8
|
-
* - `blackhole` is two DROP rules in the network namespace of the target. Thus the measurement
|
|
9
|
-
* gets the kernel timers of the client.
|
|
10
|
-
* - `freeze-process` is the cgroup freezer on the target, while its kernel stays up.
|
|
11
|
-
* - `rst` answers the next segment of the client with a reset, from the namespace of the target.
|
|
12
|
-
* It is the reference for the noise of the harness itself.
|
|
13
|
-
* - `stall` is a black hole that stops by itself, `Cell.stall` after the client sends its
|
|
14
|
-
* request. The VM times it. It shows what recovers, and when.
|
|
15
|
-
* - `fin` stops the process of the peer with SIGKILL, while its kernel stays up. The kernel closes its sockets
|
|
16
|
-
* with a FIN, or with a reset when unread data is in the queue.
|
|
17
|
-
* - `unreachable` answers each segment from the observer with an ICMP unreachable (`Cell.icmp`).
|
|
18
|
-
* Linux keeps it as a soft error on an established socket, and it continues to retransmit.
|
|
19
|
-
* - `simplex` drops the segments in one direction only (`Cell.drops`).
|
|
20
|
-
* - `mtu-blackhole` drops each segment to the observer that is longer than `Cell.mtu` bytes.
|
|
21
|
-
* - `netem` is tc netem on the egress of the target (`Cell.netem`): loss, duplication,
|
|
22
|
-
* reordering or corruption. Its outcome is a distribution.
|
|
23
|
-
*
|
|
24
|
-
* These faults are of a topology (`Cell.topology`):
|
|
25
|
-
* - `middlebox-forget` injects nothing. The router of the topology forgets an idle flow at its own
|
|
26
|
-
* idle timeout, and its form tells what a late packet then meets.
|
|
27
|
-
* - `proxy-idle` injects nothing. The proxy of the topology closes an idle connection at its own
|
|
28
|
-
* timeout.
|
|
29
|
-
* - `toxic` adds a toxic of Toxiproxy (`Cell.toxic`) through its HTTP API.
|
|
30
|
-
* - `server-close` makes the server close the connection of its peer, with the command of the
|
|
31
|
-
* target (`Target.close`): `CLIENT KILL` in Redis.
|
|
32
|
-
* - `none` injects nothing. A calibration cell measures the path itself: for example the time of a
|
|
33
|
-
* proxy between its two sockets (`Cell.calibrates`).
|
|
34
|
-
*
|
|
35
|
-
* A fault at a router of the topology (`Cell.faultAt`) acts on what the router forwards toward
|
|
36
|
-
* one side. It is a black hole, a reset or an ICMP unreachable. It can also be a simplex drop, an
|
|
37
|
-
* MTU drop or netem.
|
|
38
|
-
*
|
|
39
|
-
* These faults are of a replicated group (`Cell.group` or `Cell.replicaSet`), on the part that `Cell.faultAt` names:
|
|
40
|
-
* - `blackhole` drops each segment between the part and each of its peers. `rst` answers each
|
|
41
|
-
* segment from a peer with a reset, thus the part refuses each connection.
|
|
42
|
-
* - `partition` is a black hole between the part and some of its peers only (`GroupPlace.cuts`).
|
|
43
|
-
* - `freeze-process` stops the server process of the part with SIGSTOP, and SIGCONT thaws it. Its
|
|
44
|
-
* kernel stays up. `fin` stops the process with SIGKILL.
|
|
45
|
-
* - `planned-failover` asks a Sentinel for a failover: `SENTINEL FAILOVER <group>`.
|
|
46
|
-
*
|
|
47
|
-
* This fault is of an HTTP server:
|
|
48
|
-
* - `app-stall` injects nothing. The server process holds the reply to the request, because the
|
|
49
|
-
* request asks for that (`HttpProbe.hold`), while its kernel stays up.
|
|
50
|
-
*
|
|
51
|
-
* This fault is of a replica set (`Cell.replicaSet`):
|
|
52
|
-
* - `step-down` sends `replSetStepDown` to the primary, as a client sends a command.
|
|
53
|
-
*/
|
|
54
|
-
type Fault = "blackhole" | "freeze-process" | "rst" | "stall" | "fin" | "unreachable" | "simplex" | "mtu-blackhole" | "netem" | "middlebox-forget" | "proxy-idle" | "toxic" | "server-close" | "partition" | "planned-failover" | "app-stall" | "step-down" | "none";
|
|
55
|
-
/**
|
|
56
|
-
* A middlebox form tells what a router does with a flow that it forgot, when a late packet comes:
|
|
57
|
-
* - `reset-both` sends a reset to the two ends when it forgets the flow.
|
|
58
|
-
* - `reset-next` answers the next packet from inside with a reset to its sender, and drops a late
|
|
59
|
-
* packet from outside.
|
|
60
|
-
* - `silent-drop` drops each late packet, in each direction.
|
|
61
|
-
* - `recreate` lets a late packet from inside through, and the flow starts again. It drops a late
|
|
62
|
-
* packet from outside.
|
|
63
|
-
* - `none` is a plain NAT router. A late packet from inside starts the flow again, and the stack of
|
|
64
|
-
* the router answers a late packet from outside with a reset.
|
|
65
|
-
*/
|
|
66
|
-
type MiddleboxForm = "reset-both" | "reset-next" | "silent-drop" | "recreate" | "none";
|
|
67
|
-
/**
|
|
68
|
-
* A router is a hop that forwards and translates the addresses of the side of the client (NAT),
|
|
69
|
-
* with conntrack. It is the router image of the harness.
|
|
70
|
-
*/
|
|
71
|
-
interface RouterHop {
|
|
72
|
-
readonly name: string;
|
|
73
|
-
readonly kind: "router";
|
|
74
|
-
readonly form: MiddleboxForm;
|
|
75
|
-
/** This time is the idle timeout of an established flow: nf_conntrack_tcp_timeout_established, in whole seconds. */
|
|
76
|
-
readonly idle: Quantity;
|
|
77
|
-
/**
|
|
78
|
-
* This time is the interval of the listing that evicts each expired flow. Without it, the
|
|
79
|
-
* interval is 0.1 s. The DESTROY event of an expired flow waits for that listing.
|
|
80
|
-
*/
|
|
81
|
-
readonly pump?: Quantity;
|
|
82
|
-
/**
|
|
83
|
-
* These are the sysctls of the namespace of the router, which the router sets itself: it is
|
|
84
|
-
* privileged. An example is `net.ipv4.icmp_ratelimit` for the ICMP errors of a fault at the router.
|
|
85
|
-
*/
|
|
86
|
-
readonly sysctls?: Readonly<Record<string, string>>;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* A proxy is a hop that ends each TCP connection from the side of the client and opens its own to
|
|
90
|
-
* the next hop. It is a stock image, pinned by digest.
|
|
91
|
-
*/
|
|
92
|
-
interface ProxyHop {
|
|
93
|
-
readonly name: string;
|
|
94
|
-
readonly kind: "proxy";
|
|
95
|
-
readonly image: string;
|
|
96
|
-
/** This port is the port that the proxy listens on for the side of the client. */
|
|
97
|
-
readonly port: number;
|
|
98
|
-
readonly command?: readonly string[];
|
|
99
|
-
/** These files go into the proxy before it starts, by their path. In their content, {{next}} is the address and port of the next hop. */
|
|
100
|
-
readonly files?: Readonly<Record<string, string>>;
|
|
101
|
-
/** This text is the log line that tells that the proxy serves. */
|
|
102
|
-
readonly ready?: string;
|
|
103
|
-
/** This record is the HTTP API of Toxiproxy: its port, and the name of the proxy that gets the toxics. */
|
|
104
|
-
readonly api?: {
|
|
105
|
-
readonly port: number;
|
|
106
|
-
readonly proxy: string;
|
|
107
|
-
};
|
|
108
|
-
/** These are the sysctls of the namespace of the proxy. A privileged sidecar sets them before each run. */
|
|
109
|
-
readonly sysctls?: Readonly<Record<string, string>>;
|
|
110
|
-
/** These are the settings of the proxy, for the manifest: for example its idle timeouts. */
|
|
111
|
-
readonly settings?: Readonly<Record<string, string>>;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* A hop is one box between the client and the target. Each hop is on two networks: the network
|
|
115
|
-
* of the side of the client, and the network of the side of the target.
|
|
116
|
-
*/
|
|
117
|
-
type Hop = RouterHop | ProxyHop;
|
|
118
|
-
/**
|
|
119
|
-
* A topology is the chain of hops between the client and the target, in sequence from the client.
|
|
120
|
-
* Without hops, the client and the target are a direct pair.
|
|
121
|
-
*/
|
|
122
|
-
interface Topology {
|
|
123
|
-
readonly name: string;
|
|
124
|
-
readonly hops: readonly Hop[];
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* A group is a replicated group under an external failover authority, as data. It is a primary and
|
|
128
|
-
* its replicas, and the Sentinels that decide which member is the primary. Each member and each
|
|
129
|
-
* Sentinel is a container from the same stock image, pinned by digest. Each has its own network
|
|
130
|
-
* namespace, thus a fault can act on one part. The client finds the primary through the
|
|
131
|
-
* Sentinels, and the parts and the client share one network.
|
|
132
|
-
*/
|
|
133
|
-
interface Group {
|
|
134
|
-
/** This name is the name of the group that the Sentinels monitor, for example `mymaster`. */
|
|
135
|
-
readonly name: string;
|
|
136
|
-
/** This image is the stock image of each member and each Sentinel, pinned by digest. */
|
|
137
|
-
readonly image: string;
|
|
138
|
-
/** These are the programs of the image: the server, the Sentinel and the command line client. */
|
|
139
|
-
readonly programs: {
|
|
140
|
-
readonly server: string;
|
|
141
|
-
readonly sentinel: string;
|
|
142
|
-
readonly cli: string;
|
|
143
|
-
};
|
|
144
|
-
readonly port: number;
|
|
145
|
-
readonly sentinelPort: number;
|
|
146
|
-
/** These are the names of the members. The first one is the primary when the environment starts. */
|
|
147
|
-
readonly members: readonly string[];
|
|
148
|
-
readonly sentinels: readonly string[];
|
|
149
|
-
/** This count is how many Sentinels must agree that the primary is down. */
|
|
150
|
-
readonly quorum: number;
|
|
151
|
-
/** These are the settings of each member, as its configuration file spells them. The harness adds `replicaof` for each replica. */
|
|
152
|
-
readonly memberSettings: Readonly<Record<string, string>>;
|
|
153
|
-
/**
|
|
154
|
-
* These are the settings of each Sentinel for the group, as `sentinel <setting> <group> <value>`
|
|
155
|
-
* spells them: `down-after-milliseconds`, `failover-timeout` and `parallel-syncs`.
|
|
156
|
-
*/
|
|
157
|
-
readonly sentinelSettings: Readonly<Record<string, string>>;
|
|
158
|
-
/** These lines tell that a member and a Sentinel serve. */
|
|
159
|
-
readonly ready: {
|
|
160
|
-
readonly member: string;
|
|
161
|
-
readonly sentinel: string;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* A replica set is a replicated group with no external authority, as data: its members elect their
|
|
166
|
-
* own primary. Each member is a container from the same stock image, pinned by digest, in its own
|
|
167
|
-
* network namespace. The client finds the primary by its own monitors. The harness starts the set
|
|
168
|
-
* with the address of each member, and it waits for a primary.
|
|
169
|
-
*/
|
|
170
|
-
interface ReplicaSet {
|
|
171
|
-
/** This name is the name of the set, for example `rs0`. */
|
|
172
|
-
readonly name: string;
|
|
173
|
-
/** This image is the stock image of each member, pinned by digest. */
|
|
174
|
-
readonly image: string;
|
|
175
|
-
/** These are the programs of the image: the server and its shell. */
|
|
176
|
-
readonly programs: {
|
|
177
|
-
readonly server: string;
|
|
178
|
-
readonly shell: string;
|
|
179
|
-
};
|
|
180
|
-
/** These are the options of the server of each member, after the name of the set: for example the size of its cache. */
|
|
181
|
-
readonly args?: readonly string[];
|
|
182
|
-
readonly port: number;
|
|
183
|
-
/** These are the names of the members. The first one starts the set. */
|
|
184
|
-
readonly members: readonly string[];
|
|
185
|
-
/** These are the settings of the configuration of the set, as `rs.initiate` takes them: for example `electionTimeoutMillis`. */
|
|
186
|
-
readonly settings: Readonly<Record<string, number>>;
|
|
187
|
-
/** This line tells that a member serves. */
|
|
188
|
-
readonly ready: string;
|
|
189
|
-
}
|
|
190
|
-
/** A group role is a part of a group by its role at the start of a run: the primary, a replica, or a Sentinel. */
|
|
191
|
-
type GroupRole = "primary" | "replica" | "sentinel";
|
|
192
|
-
/**
|
|
193
|
-
* A group place is the part of a group that a fault acts on. A network fault cuts the part from
|
|
194
|
-
* some of its peers:
|
|
195
|
-
* - `all`: each other part of the group, and each client. This is the default.
|
|
196
|
-
* - `group`: the other members and the Sentinels, but not the clients.
|
|
197
|
-
* - `clients`: the clients, but not the group.
|
|
198
|
-
* - `one`: one other member, in both directions.
|
|
199
|
-
* - `one-way`: one other member, for the segments from the part only.
|
|
200
|
-
*/
|
|
201
|
-
interface GroupPlace {
|
|
202
|
-
readonly role: GroupRole;
|
|
203
|
-
readonly cuts?: "all" | "group" | "clients" | "one" | "one-way";
|
|
204
|
-
}
|
|
205
|
-
/** A toxic is one toxic of Toxiproxy, as its API takes it. Its toxicity is 1. */
|
|
206
|
-
interface Toxic {
|
|
207
|
-
readonly type: "latency" | "timeout" | "reset_peer" | "slow_close" | "bandwidth" | "limit_data" | "slicer";
|
|
208
|
-
readonly stream: "downstream" | "upstream";
|
|
209
|
-
readonly attributes: Readonly<Record<string, number>>;
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* A reference is the event that the time of a detector counts from: the event that arms the
|
|
213
|
-
* timer in its machine document. Keepalive counts from the last received segment. The give-up of
|
|
214
|
-
* the retransmissions counts from the first retransmission of the RTO timer, not from the tail
|
|
215
|
-
* loss probe one RTO before it. The request itself meets a reset, thus a reset counts from the
|
|
216
|
-
* send of the client. A FIN counts from the change of state of the socket of the peer when its
|
|
217
|
-
* process dies (`peer-closed`). A toxic of Toxiproxy counts from the start of its commit, as the
|
|
218
|
-
* injector stamps it (`fault`).
|
|
219
|
-
*
|
|
220
|
-
* A client that starts into a fault counts from its `connecting` line, or from its first line
|
|
221
|
-
* without one (`client-start`).
|
|
222
|
-
*
|
|
223
|
-
* A heartbeat of a program counts from its first ping that got no answer (`ping-sent`). The
|
|
224
|
-
* program writes a `ping` line before each ping, and the kernel stamps the write (`tx`). No
|
|
225
|
-
* segment with data reaches the socket after that write, up to the detection.
|
|
226
|
-
*/
|
|
227
|
-
type Reference = "last-received" | "first-retransmission" | "request-sent" | "peer-closed" | "fault" | "client-start" | "ping-sent";
|
|
228
|
-
/**
|
|
229
|
-
* This prediction tells when a connection moves again after a stall. That occurs at the first
|
|
230
|
-
* firing of its retransmission timer after the stall stops, and its reply comes back one round
|
|
231
|
-
* trip later.
|
|
232
|
-
*/
|
|
233
|
-
interface Recovers {
|
|
234
|
-
/** This count identifies the firing that gets through: the number of firings before it. */
|
|
235
|
-
readonly firing: number;
|
|
236
|
-
/** This time is the earliest return of the reply, from the send of the request. */
|
|
237
|
-
readonly low: Quantity;
|
|
238
|
-
/** This time is the latest return of the reply, from the send of the request. */
|
|
239
|
-
readonly high: Quantity;
|
|
240
|
-
/**
|
|
241
|
-
* This range is where the stall must stop, from the send, so that this firing is the first
|
|
242
|
-
* after it. The range starts after the latest time of the firing before, and it stops before
|
|
243
|
-
* the earliest time of this firing.
|
|
244
|
-
*/
|
|
245
|
-
readonly heal: {
|
|
246
|
-
readonly low: Quantity;
|
|
247
|
-
readonly high: Quantity;
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* This prediction tells when the reply to the request comes back, from the send of the request.
|
|
252
|
-
* For example, the reply comes after the latency of a toxic, or after a forgotten flow starts again.
|
|
253
|
-
*/
|
|
254
|
-
interface Replies {
|
|
255
|
-
readonly low: Quantity;
|
|
256
|
-
readonly high: Quantity;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* An RTT range is the range of the first round trip of the observer that a band assumes. The
|
|
260
|
-
* models read a round trip, for example 1 ms. The band at that value holds within the noise for
|
|
261
|
-
* each round trip in the range. A run whose first round trip is above the range is void.
|
|
262
|
-
*/
|
|
263
|
-
interface RttRange {
|
|
264
|
-
readonly low: Quantity;
|
|
265
|
-
readonly high: Quantity;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* A proxy time is the time of one proxy in one direction that a band includes. It is an upper
|
|
269
|
-
* quantile of the times that a calibration cell of the proxy measured. Each time goes from an
|
|
270
|
-
* arrival on one socket of the proxy to its write on the other. `up` goes toward the target, and
|
|
271
|
-
* `down` toward the client.
|
|
272
|
-
*/
|
|
273
|
-
interface ProxyTime {
|
|
274
|
-
readonly hop: string;
|
|
275
|
-
readonly direction: "up" | "down";
|
|
276
|
-
/** This fraction is the quantile of the calibration, for example 0.99. */
|
|
277
|
-
readonly quantile: number;
|
|
278
|
-
readonly time: Quantity;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* A stage is one step of the timeline of a group after a fault, by the event that a Sentinel
|
|
282
|
-
* publishes for it. The stages are the subjective down, the objective down, the start of a
|
|
283
|
-
* failover and the election. Then the selection of a replica, the promotion, the switch to the new
|
|
284
|
-
* primary, and the conversion of the old primary into a replica.
|
|
285
|
-
*/
|
|
286
|
-
type SentinelStage = "+sdown" | "+odown" | "+try-failover" | "+elected-leader" | "+selected-slave" | "+promoted-slave" | "+switch-master" | "+convert-to-slave";
|
|
287
|
-
/**
|
|
288
|
-
* A replica set stage is one step of the timeline of a replica set after a fault. A line of the log
|
|
289
|
-
* of a member marks it, or a line of the client. The stages are a member that marks the primary
|
|
290
|
-
* DOWN, the start of an election and its win, and the end of the catch-up. Then come the first
|
|
291
|
-
* write of the new primary and the step-down of the old one. The client's lines give its discovery
|
|
292
|
-
* of the new primary, the write-off of the old one, and the first write that a primary accepts.
|
|
293
|
-
*/
|
|
294
|
-
type ReplicaSetStage = "member-down" | "election-start" | "elected" | "caught-up" | "writable" | "old-primary-steps-down" | "discovered" | "written-off" | "first-write";
|
|
295
|
-
/** A stage is one step of the timeline of a group: of a group under Sentinels, or of a replica set. */
|
|
296
|
-
type Stage = SentinelStage | ReplicaSetStage;
|
|
297
|
-
/** A stage band is when the first part announces a stage, from the reference of the cell. */
|
|
298
|
-
interface StageBand {
|
|
299
|
-
readonly stage: Stage;
|
|
300
|
-
readonly low: Quantity;
|
|
301
|
-
readonly high: Quantity;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* A group prediction tells what a group does after the fault, beside the band of its cell:
|
|
305
|
-
* - `lands` is the primary that the first accepted write after the fault lands on: a new one, or the same one.
|
|
306
|
-
* - `failover` tells if a Sentinel announces a switch to a new primary in the window.
|
|
307
|
-
* - `stages` are the bands of the stages of the timeline. Each band includes the error of the
|
|
308
|
-
* stamps of the observer (`stamps`).
|
|
309
|
-
* - `errors` are the errors that the client must meet on the way, each with the band of its
|
|
310
|
-
* first occurrence. An example is the error of the offline queue when it gives up.
|
|
311
|
-
* - `quiet` are the stages that must not occur after the fault. Each one that a run shows is a finding.
|
|
312
|
-
*/
|
|
313
|
-
interface GroupPrediction {
|
|
314
|
-
readonly lands: "new" | "same";
|
|
315
|
-
readonly failover: boolean;
|
|
316
|
-
readonly stages: readonly StageBand[];
|
|
317
|
-
readonly stamps?: Quantity;
|
|
318
|
-
readonly errors?: ReadonlyArray<{
|
|
319
|
-
readonly name: string;
|
|
320
|
-
readonly low: Quantity;
|
|
321
|
-
readonly high: Quantity;
|
|
322
|
-
}>;
|
|
323
|
-
readonly quiet?: readonly Stage[];
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* A middlebox expectation tells what the router of a topology does with the flow in the window of
|
|
327
|
-
* a silent prediction. Without it, the router keeps the flow. With `forgets`, the router forgets
|
|
328
|
-
* the flow in that band after the last segment of the client, and nothing detects it.
|
|
329
|
-
*/
|
|
330
|
-
interface MiddleboxExpectation {
|
|
331
|
-
readonly forgets: {
|
|
332
|
-
readonly low: Quantity;
|
|
333
|
-
readonly high: Quantity;
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* A request prediction tells what the second request of an HTTP client meets, beside the band of
|
|
338
|
-
* its cell. The client writes it in its lines: the connection of each try, and the outcome.
|
|
339
|
-
* - `connection` is the connection of its first try: the one that the first request used
|
|
340
|
-
* (`reused`), or a new one.
|
|
341
|
-
* - `retried` tells that the client sent it again on a new connection by itself.
|
|
342
|
-
* - `error` is the error that reaches the caller, or null for a reply.
|
|
343
|
-
* - `pending` tells that nothing ends the request in the window of the cell.
|
|
344
|
-
*/
|
|
345
|
-
interface RequestPrediction {
|
|
346
|
-
readonly connection: "reused" | "new";
|
|
347
|
-
readonly retried: boolean;
|
|
348
|
-
readonly error: string | null;
|
|
349
|
-
readonly pending?: true;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* A line match is a line of the client that a driver band waits for. It has the `ev` of the line,
|
|
353
|
-
* and the value of each field that it names. A dotted name is a field in a field, for example
|
|
354
|
-
* `failure.name`. `name` is the field that names the error of the line, for its outcome.
|
|
355
|
-
*/
|
|
356
|
-
interface LineMatch {
|
|
357
|
-
readonly ev: string;
|
|
358
|
-
readonly where?: Readonly<Record<string, string | number | boolean>>;
|
|
359
|
-
readonly name?: string;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* A driver step is one more band of a driver after the band of its cell. An example is the error
|
|
363
|
-
* of the retry after the interruption. It has its own reference on a socket of the driver, its
|
|
364
|
-
* line, and its band. A run whose step is outside its band, or absent, has a finding.
|
|
365
|
-
*/
|
|
366
|
-
interface DriverStep {
|
|
367
|
-
readonly what: string;
|
|
368
|
-
/** This name is the name of the error of the line, or OK. */
|
|
369
|
-
readonly name: string;
|
|
370
|
-
/** This role is the socket of the reference. Without it, the socket is the socket of the band of the cell. */
|
|
371
|
-
readonly socket?: string;
|
|
372
|
-
readonly from: Reference;
|
|
373
|
-
readonly ends: LineMatch;
|
|
374
|
-
readonly low: Quantity;
|
|
375
|
-
readonly high: Quantity;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* A driver band is a band of a cell whose client is a driver with more than one socket, for
|
|
379
|
-
* example the MongoDB driver. It names the socket of the reference, and the line that ends the
|
|
380
|
-
* band:
|
|
381
|
-
* - `socket` is the role of the socket, as the client names it in its `socket` lines. The socket
|
|
382
|
-
* `server` is the socket of the target for the first connection of the pool.
|
|
383
|
-
* - `ends` is the line of the client that marks the detection. Without it, the detection is the
|
|
384
|
-
* report of the kernel on the socket: an error, or the end of the file.
|
|
385
|
-
* - `reply` is the line of a reply that a silent prediction times (`replies`), with its reference.
|
|
386
|
-
* - `quiet` are the lines that must not occur after the fault, in the window of the prediction.
|
|
387
|
-
* - `then` are the later bands, each one a test of its own.
|
|
388
|
-
*
|
|
389
|
-
* A band whose line ends it is a timer of the driver. Its `last-received` is the last segment with
|
|
390
|
-
* data that its socket received or sent. The idle timer of a Node socket starts again at each read
|
|
391
|
-
* and each write. A band of the kernel counts from the last segment of any kind that the socket
|
|
392
|
-
* received.
|
|
393
|
-
*/
|
|
394
|
-
interface DriverBand {
|
|
395
|
-
readonly socket: string;
|
|
396
|
-
readonly ends?: LineMatch;
|
|
397
|
-
readonly reply?: {
|
|
398
|
-
readonly from: Reference;
|
|
399
|
-
readonly ends: LineMatch;
|
|
400
|
-
};
|
|
401
|
-
readonly quiet?: readonly LineMatch[];
|
|
402
|
-
readonly then?: readonly DriverStep[];
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* A reconnect prediction tells when the program of the client tries a new connection after the
|
|
406
|
-
* detection. Each wait counts from the start of the reconnect timer of the program (a
|
|
407
|
-
* `reconnecting` line) to the try (a `dial` line). The first wait follows the detection, and each
|
|
408
|
-
* next wait follows the failure of the try before it.
|
|
409
|
-
*/
|
|
410
|
-
interface Reconnects {
|
|
411
|
-
readonly waits: ReadonlyArray<{
|
|
412
|
-
readonly low: Quantity;
|
|
413
|
-
readonly high: Quantity;
|
|
414
|
-
}>;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* A prediction is what a cell predicts. Either a detection occurs in an interval [T_lo, T_hi]
|
|
418
|
-
* after the reference event, or nothing detects the fault in a window. Nothing detects a stall
|
|
419
|
-
* that is shorter than the give-up, and the connection recovers from it. The prediction then also
|
|
420
|
-
* tells when. A silent prediction can also tell when the reply to the request comes back
|
|
421
|
-
* (`replies`), and what a router does with the flow (`middlebox`).
|
|
422
|
-
*
|
|
423
|
-
* A band can name the first round trip that it assumes (`rtt`), and the proxy times that it
|
|
424
|
-
* includes (`through`).
|
|
425
|
-
*
|
|
426
|
-
* A cell whose outcome is a distribution, for example under netem loss, has no band. Its
|
|
427
|
-
* prediction is `detects: null` with the reason, and its runs are measurements only. A
|
|
428
|
-
* measurement-only cell that names a reference (`from`) also records the time from it to the end
|
|
429
|
-
* of the connection, or to the last data. It can also give the waits of the reconnect after that
|
|
430
|
-
* end (`reconnects`).
|
|
431
|
-
*
|
|
432
|
-
* For a group cell, the band is the first write that a primary accepts after the fault, and its
|
|
433
|
-
* errno is `OK`. `group` tells which primary, and the stages of the group on the way.
|
|
434
|
-
*
|
|
435
|
-
* For an HTTP cell, `request` tells what the second request meets. The errno `CLOSED` is a close
|
|
436
|
-
* of the observer itself: its pool closes an idle connection, a FIN that it sends.
|
|
437
|
-
*
|
|
438
|
-
* A band of a driver (`driver`) counts from a socket of the driver to a line of the client.
|
|
439
|
-
*
|
|
440
|
-
* The errno `DROPPED` is a drop by the program of the observer itself. Its own timer gave up, and
|
|
441
|
-
* it closed its socket or wrote a close frame. A detection can also tell when the client tries a
|
|
442
|
-
* new connection (`reconnects`).
|
|
443
|
-
*/
|
|
444
|
-
type Prediction = {
|
|
445
|
-
readonly detects: true;
|
|
446
|
-
/** This name is the timer of the machine that fires first, or the event that detects the fault, with its errno. */
|
|
447
|
-
readonly timer: string;
|
|
448
|
-
/**
|
|
449
|
-
* This name is the errno of the detection, or EOF for an end of file without an error. It is
|
|
450
|
-
* OK for a write that a primary accepts, and CLOSED for a close of the observer itself. It is
|
|
451
|
-
* DROPPED for a drop by the program of the observer.
|
|
452
|
-
*/
|
|
453
|
-
readonly errno: string;
|
|
454
|
-
readonly from: Reference;
|
|
455
|
-
/** This time is the closed form, less the most that the timer can fire early. */
|
|
456
|
-
readonly low: Quantity;
|
|
457
|
-
/** This time is the closed form, plus the most that the timer can fire late, plus each proxy time. */
|
|
458
|
-
readonly high: Quantity;
|
|
459
|
-
/**
|
|
460
|
-
* This time is the latest reference of the band after the reply of the client. It is for a
|
|
461
|
-
* reference that can come late, for example the first ping without an answer of a server
|
|
462
|
-
* heartbeat. The run then waits that much longer for the detection.
|
|
463
|
-
*/
|
|
464
|
-
readonly startsBy?: Quantity;
|
|
465
|
-
readonly rtt?: RttRange;
|
|
466
|
-
readonly through?: readonly ProxyTime[];
|
|
467
|
-
readonly group?: GroupPrediction;
|
|
468
|
-
readonly request?: RequestPrediction;
|
|
469
|
-
readonly driver?: DriverBand;
|
|
470
|
-
readonly reconnects?: Reconnects;
|
|
471
|
-
/**
|
|
472
|
-
* This name tells how the program drops the connection, for the errno DROPPED. A close frame
|
|
473
|
-
* leaves its socket ESTABLISHED below (`frame`). A close of its socket takes it out of
|
|
474
|
-
* ESTABLISHED at once (`close`).
|
|
475
|
-
*/
|
|
476
|
-
readonly drop?: "frame" | "close";
|
|
477
|
-
/**
|
|
478
|
-
* This flag tells that the program of the observer is the client process, which ends at the
|
|
479
|
-
* end of the run. Its kernel then closes each socket that is still open. A close of the
|
|
480
|
-
* socket at that end is not a close by the program, thus `left` stays null for it (`exited`).
|
|
481
|
-
*/
|
|
482
|
-
readonly exits?: true;
|
|
483
|
-
} | {
|
|
484
|
-
readonly detects: false;
|
|
485
|
-
readonly window: Quantity;
|
|
486
|
-
readonly recovers?: Recovers;
|
|
487
|
-
readonly replies?: Replies;
|
|
488
|
-
readonly middlebox?: MiddleboxExpectation;
|
|
489
|
-
readonly rtt?: RttRange;
|
|
490
|
-
readonly through?: readonly ProxyTime[];
|
|
491
|
-
readonly group?: GroupPrediction;
|
|
492
|
-
readonly request?: RequestPrediction;
|
|
493
|
-
readonly driver?: DriverBand;
|
|
494
|
-
} | {
|
|
495
|
-
readonly detects: null;
|
|
496
|
-
readonly window: Quantity;
|
|
497
|
-
readonly why: string;
|
|
498
|
-
readonly from?: Reference;
|
|
499
|
-
/**
|
|
500
|
-
* This choice ends the measured time at the close of the socket by the observer itself, the
|
|
501
|
-
* change from ESTABLISHED to FIN_WAIT1. Without it, the time ends at a report of the kernel or
|
|
502
|
-
* at the last data. Then an idle pool that closes its own socket gives no end.
|
|
503
|
-
*/
|
|
504
|
-
readonly ends?: "own-close";
|
|
505
|
-
readonly group?: GroupPrediction;
|
|
506
|
-
readonly request?: RequestPrediction;
|
|
507
|
-
/**
|
|
508
|
-
* These are the waits of the reconnect after the end of the connection, from the document of
|
|
509
|
-
* the client. The end has no band, but each wait has one. A wait outside its band is a finding of its run.
|
|
510
|
-
*/
|
|
511
|
-
readonly reconnects?: Reconnects;
|
|
512
|
-
};
|
|
513
|
-
/** A target is the server that a cell connects to: a stock image. */
|
|
514
|
-
interface Target {
|
|
515
|
-
/** This image is a stock image, pinned by digest. */
|
|
516
|
-
readonly image: string;
|
|
517
|
-
readonly port: number;
|
|
518
|
-
/** This text is the log line that tells that the target serves. */
|
|
519
|
-
readonly ready: string;
|
|
520
|
-
/**
|
|
521
|
-
* These commands set and read one setting of the target, as argv in it. The name and the value
|
|
522
|
-
* come after them: `redis-cli CONFIG SET` and `CONFIG GET` for Redis. Without them, the target
|
|
523
|
-
* has no settings to set.
|
|
524
|
-
*/
|
|
525
|
-
readonly settings?: {
|
|
526
|
-
readonly set: readonly string[];
|
|
527
|
-
readonly get: readonly string[];
|
|
528
|
-
};
|
|
529
|
-
/**
|
|
530
|
-
* This command replaces the command of the image, for example a shell that holds the server
|
|
531
|
-
* process as its child. Then a `fin` fault can stop the server, and the container stays up.
|
|
532
|
-
*/
|
|
533
|
-
readonly command?: readonly string[];
|
|
534
|
-
/** This command stops the server process in the target with SIGKILL, as argv, for a `fin` fault. */
|
|
535
|
-
readonly kill?: readonly string[];
|
|
536
|
-
/** This command makes the server close the connection of each client, as argv, for a `server-close` fault. */
|
|
537
|
-
readonly close?: readonly string[];
|
|
538
|
-
/**
|
|
539
|
-
* These files go into the target before it starts, by their path, for example the script of a
|
|
540
|
-
* server on a stock Node image. The image stays stock.
|
|
541
|
-
*/
|
|
542
|
-
readonly files?: Readonly<Record<string, string>>;
|
|
543
|
-
/**
|
|
544
|
-
* This flag tells that the target writes JSON lines with an `ev` and a `t` on its standard
|
|
545
|
-
* output, on CLOCK_MONOTONIC. Each run then keeps its lines (`Run.server`).
|
|
546
|
-
*/
|
|
547
|
-
readonly lines?: true;
|
|
548
|
-
/**
|
|
549
|
-
* This name is the server process, as /proc/PID/comm holds it. With it, a freeze of the target
|
|
550
|
-
* stops this process with SIGSTOP from a sidecar in its process namespace, and the injector
|
|
551
|
-
* stamps it. SIGCONT then thaws it. Without it, the freeze is the cgroup freezer, with no stamps.
|
|
552
|
-
*/
|
|
553
|
-
readonly program?: string;
|
|
554
|
-
/**
|
|
555
|
-
* This name is an image of the harness that the target operates in place of `image`. An
|
|
556
|
-
* example is the image of the procedures client, which also holds the script of its server.
|
|
557
|
-
* `image` is then the stock base of that image, for the record.
|
|
558
|
-
*/
|
|
559
|
-
readonly harness?: HarnessImage;
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* A harness image is an image of the harness that a target can operate. `procedures` is the
|
|
563
|
-
* image of `@procedures/client` on Node: its WebSocket client and its server script.
|
|
564
|
-
*/
|
|
565
|
-
type HarnessImage = "procedures";
|
|
566
|
-
/**
|
|
567
|
-
* A client is what the runs of a cell use: the TCP client of the harness, or a driver on its
|
|
568
|
-
* socket. The HTTP clients are the `http.Transport` of Go (`go-http`), the `http.Agent` of Node
|
|
569
|
-
* (`http-agent`) and an HTTP/1.1 `Client` of undici (`undici`). The MongoDB driver is `mongodb`, node-postgres is `pg`, and
|
|
570
|
-
* the WebSocket client of `@procedures/client` is `procedures-ws`.
|
|
571
|
-
*/
|
|
572
|
-
type Client = "tcp" | "ioredis" | "go-http" | "http-agent" | "undici" | "mongodb" | "pg" | "procedures-ws";
|
|
573
|
-
/**
|
|
574
|
-
* A WebSocket probe is the workload and the settings of the WebSocket client of
|
|
575
|
-
* `@procedures/client` (`procedures-ws`). The cell gives each setting, thus the client takes
|
|
576
|
-
* nothing from a default.
|
|
577
|
-
*/
|
|
578
|
-
interface WsProbe {
|
|
579
|
-
/**
|
|
580
|
-
* This name is the class of the sockets of the client: the global `WebSocket` of Node (`global`),
|
|
581
|
-
* or the `WebSocket` of the `ws` package (`ws`, the option `webSocket`).
|
|
582
|
-
*/
|
|
583
|
-
readonly socket: "global" | "ws";
|
|
584
|
-
/**
|
|
585
|
-
* These are the settings of the heartbeat: a ping each interval, the wait for its pong, and the
|
|
586
|
-
* misses in sequence that drop the connection. Null turns the heartbeat off.
|
|
587
|
-
*/
|
|
588
|
-
readonly heartbeat: {
|
|
589
|
-
readonly interval: Quantity;
|
|
590
|
-
readonly timeout: Quantity;
|
|
591
|
-
readonly misses: number;
|
|
592
|
-
} | null;
|
|
593
|
-
/**
|
|
594
|
-
* These are the settings of the reconnect: the first delay, the multiplier of each next delay,
|
|
595
|
-
* the longest delay and the most tries. `jitter` is the random part of each delay, from 0 to 1.
|
|
596
|
-
* Null turns the reconnect off.
|
|
597
|
-
*/
|
|
598
|
-
readonly reconnect: {
|
|
599
|
-
readonly initialDelay: Quantity;
|
|
600
|
-
readonly multiplier: number;
|
|
601
|
-
readonly maxDelay: Quantity;
|
|
602
|
-
readonly attempts: number;
|
|
603
|
-
readonly jitter: number;
|
|
604
|
-
} | null;
|
|
605
|
-
/** This time is how long a call waits for its first frame. */
|
|
606
|
-
readonly requestTimeout: Quantity;
|
|
607
|
-
/** This time is how long a call waits for a connection. */
|
|
608
|
-
readonly connectionTimeout: Quantity;
|
|
609
|
-
/** This time is how long the server holds the reply to the call in flight. Without it, the server replies at once. */
|
|
610
|
-
readonly hold?: Quantity;
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* An HTTP probe is the workload of an HTTP client. The first request is a GET of the root. The
|
|
614
|
-
* second request follows the mode of the probe: after the signal (`inflight`), or after a gap
|
|
615
|
-
* (`gap`).
|
|
616
|
-
*/
|
|
617
|
-
interface HttpProbe {
|
|
618
|
-
/** This method is the method of the second request. */
|
|
619
|
-
readonly method: "GET" | "POST";
|
|
620
|
-
/** This time is the gap of a `gap` workload: from the end of the first reply to the second request. */
|
|
621
|
-
readonly gap?: Quantity;
|
|
622
|
-
/** This time is how long the server holds the reply to the second request (`/hold?ms=`). */
|
|
623
|
-
readonly hold?: Quantity;
|
|
624
|
-
/** This length is the length of the body of the reply to the second request, in bytes (`/big?bytes=`). */
|
|
625
|
-
readonly bytes?: number;
|
|
626
|
-
/** These are settings of the client over its defaults, by the names of its flags: for example `idle-conn-timeout-ms`. */
|
|
627
|
-
readonly options?: Readonly<Record<string, number>>;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* A client image is a process that a lab starts as the client of each run, in the network
|
|
631
|
-
* namespace of the client. An example is an agent of an application on Node. Its command gets the
|
|
632
|
-
* arguments of the TCP client of the harness. These are the address and the port of the target, then
|
|
633
|
-
* the options of the cell. It writes JSON lines with an `ev` and a `t` (CLOCK_MONOTONIC in
|
|
634
|
-
* nanoseconds) on its standard output, as the client of the harness does.
|
|
635
|
-
*/
|
|
636
|
-
interface ClientImage {
|
|
637
|
-
readonly image: string;
|
|
638
|
-
readonly command: readonly string[];
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* An observer is the side whose detection a cell measures. The client is one observer. The
|
|
642
|
-
* server is another observer. It is the hold of the target on the connection of the client, at
|
|
643
|
-
* its server socket in its namespace. The fault is on the peer of the observer. Thus
|
|
644
|
-
* freeze-process freezes the target for the client, and the client for the server.
|
|
645
|
-
*
|
|
646
|
-
* A proxy of a topology is the third observer: its socket toward the client, or its socket toward
|
|
647
|
-
* the target.
|
|
648
|
-
*/
|
|
649
|
-
type Observer = "client" | "server" | {
|
|
650
|
-
readonly hop: string;
|
|
651
|
-
readonly toward: "client" | "target";
|
|
652
|
-
};
|
|
653
|
-
/** A cell is one cell of the matrix: a topology, its settings, a workload, a fault and the prediction. */
|
|
654
|
-
interface Cell {
|
|
655
|
-
readonly name: string;
|
|
656
|
-
readonly target: Target;
|
|
657
|
-
/** These are the sysctls of the network namespace of the client, as the kernel spells them. The harness sets them before the client connects. */
|
|
658
|
-
readonly sysctls: Readonly<Record<string, string>>;
|
|
659
|
-
readonly probe: {
|
|
660
|
-
/**
|
|
661
|
-
* This mode tells if the client is idle after its first reply, or sends a request into the
|
|
662
|
-
* fault. In a stream, it sends `count` requests into it, each `interval` after the reply before.
|
|
663
|
-
* An HTTP client in a `gap` sends its second request a gap after its first reply, by itself.
|
|
664
|
-
*/
|
|
665
|
-
readonly mode: "idle" | "inflight" | "stream" | "gap";
|
|
666
|
-
/** This count is the number of requests of a stream. */
|
|
667
|
-
readonly count?: number;
|
|
668
|
-
/** This time is the pause after each reply of a stream, before the next request. */
|
|
669
|
-
readonly interval?: Quantity;
|
|
670
|
-
/** This flag sets SO_KEEPALIVE without overrides for the socket: the keepalive sysctls of the namespace apply. */
|
|
671
|
-
readonly keepalive: boolean;
|
|
672
|
-
/** This time sets TCP_USER_TIMEOUT. Without it, the default of the kernel (off) applies. */
|
|
673
|
-
readonly userTimeout?: Quantity;
|
|
674
|
-
/**
|
|
675
|
-
* This text is the request that an in-flight run sends, as a Redis inline command. Without it,
|
|
676
|
-
* the request is PING. BLPOP with a timeout makes the server answer only at the timeout. Thus
|
|
677
|
-
* a cell on the server side has a reply in flight when the fault occurs.
|
|
678
|
-
*/
|
|
679
|
-
readonly request?: string;
|
|
680
|
-
/**
|
|
681
|
-
* This driver replaces the TCP client of the harness, with its own options. The driver then
|
|
682
|
-
* ignores `keepalive` and `userTimeout`:
|
|
683
|
-
* - ioredis 6 on Node, whose keepAlive is the keepalive delay of the socket.
|
|
684
|
-
* - the MongoDB driver on Node, against the replica set `set`. Its operation is a write, or
|
|
685
|
-
* the read of a long document (`read-long`). `Cell.driverOptions` are its options.
|
|
686
|
-
* - node-postgres on Node, as a `pg.Pool` against one server. Its operation is `query`, or
|
|
687
|
-
* `SELECT 1`. `Cell.driverOptions` are the options of its pool.
|
|
688
|
-
*/
|
|
689
|
-
readonly driver?: {
|
|
690
|
-
readonly name: "ioredis";
|
|
691
|
-
readonly keepAlive: Quantity;
|
|
692
|
-
} | {
|
|
693
|
-
readonly name: "mongodb";
|
|
694
|
-
readonly set: string;
|
|
695
|
-
readonly op?: "write" | "read-long";
|
|
696
|
-
} | {
|
|
697
|
-
readonly name: "pg";
|
|
698
|
-
readonly query?: string;
|
|
699
|
-
};
|
|
700
|
-
/** This workload is the workload of an HTTP client (`Cell.client` is an HTTP client). The client then ignores `keepalive` and `userTimeout`. */
|
|
701
|
-
readonly http?: HttpProbe;
|
|
702
|
-
/** These are the settings of the WebSocket client (`Cell.client` is `procedures-ws`). The client then ignores `keepalive` and `userTimeout`. */
|
|
703
|
-
readonly ws?: WsProbe;
|
|
704
|
-
};
|
|
705
|
-
readonly fault: Fault;
|
|
706
|
-
/** This time is the length of a stall, from the send of the request. */
|
|
707
|
-
readonly stall?: Quantity;
|
|
708
|
-
/** This code is the ICMP unreachable of an `unreachable` fault. */
|
|
709
|
-
readonly icmp?: "host" | "net" | "port" | "admin";
|
|
710
|
-
/** This direction is the one that a `simplex` fault drops: the segments to the server, or to the client. */
|
|
711
|
-
readonly drops?: "to-server" | "to-client";
|
|
712
|
-
/** This length is the longest segment, in bytes, that an `mtu-blackhole` fault lets through to the observer. */
|
|
713
|
-
readonly mtu?: number;
|
|
714
|
-
/**
|
|
715
|
-
* This specification is the tc netem of a `netem` fault, for example "loss 5%". It is on the
|
|
716
|
-
* egress of the target, or at a hop (`faultAt`) on the egress of its device toward one side.
|
|
717
|
-
*/
|
|
718
|
-
readonly netem?: string;
|
|
719
|
-
/**
|
|
720
|
-
* This delay goes on the egress of the target before the client connects, with tc netem. Thus
|
|
721
|
-
* each round trip is longer by the delay, and so is the RTO.
|
|
722
|
-
*/
|
|
723
|
-
readonly latency?: Quantity;
|
|
724
|
-
/** These commands run in the target before a client connects, each as argv: for example, a large value to read. */
|
|
725
|
-
readonly targetSetup?: readonly (readonly string[])[];
|
|
726
|
-
readonly prediction: Prediction;
|
|
727
|
-
/** This side is the side whose detection the cell measures. Without it, the side is the client. */
|
|
728
|
-
readonly observer?: Observer;
|
|
729
|
-
/** These are the settings of the target. The harness sets them in each environment before a client connects. */
|
|
730
|
-
readonly targetSettings?: Readonly<Record<string, string>>;
|
|
731
|
-
/** These are the sysctls of the network namespace of the target, for a cell on the server side: its tcp_retries2. */
|
|
732
|
-
readonly targetSysctls?: Readonly<Record<string, string>>;
|
|
733
|
-
/** This topology puts hops between the client and the target. Without it, the client and the target are a direct pair. */
|
|
734
|
-
readonly topology?: Topology;
|
|
735
|
-
/** This place is where the fault goes, when it is not the peer of the observer: for example one side of a hop. */
|
|
736
|
-
readonly faultAt?: FaultPlace;
|
|
737
|
-
/** This time is how long an in-flight client stays idle after the fault holds, before it sends its request. */
|
|
738
|
-
readonly idleBefore?: Quantity;
|
|
739
|
-
/** This toxic is the toxic of a `toxic` fault, which the Toxiproxy hop gets. */
|
|
740
|
-
readonly toxic?: Toxic;
|
|
741
|
-
/** This image, or this client of the harness, replaces the TCP client of the harness for each run. An HTTP client is one. */
|
|
742
|
-
readonly client?: ClientImage | Client;
|
|
743
|
-
/**
|
|
744
|
-
* This name is the proxy hop whose own time a calibration cell measures. The time of a request
|
|
745
|
-
* (`up`) starts at its arrival on the socket of the proxy toward the client. It stops at the
|
|
746
|
-
* write on the socket toward the target. The time of its reply (`down`) goes the other way.
|
|
747
|
-
*
|
|
748
|
-
* For a group cell, `sentinels` makes the prober watch the namespace of each Sentinel too. Each
|
|
749
|
-
* stamp of the observer then gets the write of its Sentinel that it read (`lags`).
|
|
750
|
-
*/
|
|
751
|
-
readonly calibrates?: string;
|
|
752
|
-
/**
|
|
753
|
-
* This group replaces the target: a replicated group under its Sentinels. The client is then
|
|
754
|
-
* ioredis in Sentinel mode, and it writes a stream of sequence numbers. `target` stays for the
|
|
755
|
-
* record, and the group does not read it.
|
|
756
|
-
*/
|
|
757
|
-
readonly group?: Group;
|
|
758
|
-
/**
|
|
759
|
-
* This replica set replaces the target: a replicated group whose members elect their own
|
|
760
|
-
* primary. The client is then the MongoDB driver, and it writes a stream of sequence numbers.
|
|
761
|
-
* `target` stays for the record, and the set does not read it.
|
|
762
|
-
*/
|
|
763
|
-
readonly replicaSet?: ReplicaSet;
|
|
764
|
-
/**
|
|
765
|
-
* This time is how long a fault on a group holds after its commit. The injector then lifts it at
|
|
766
|
-
* that instant, on the clock of the VM. On a direct pair, a frozen target thaws after it.
|
|
767
|
-
*/
|
|
768
|
-
readonly hold?: Quantity;
|
|
769
|
-
/** This flag makes a planned failover coordinated: `SENTINEL FAILOVER <group> COORDINATED`. */
|
|
770
|
-
readonly coordinated?: boolean;
|
|
771
|
-
/**
|
|
772
|
-
* These are options of the driver over its defaults: of ioredis for the client of a group, or of
|
|
773
|
-
* the MongoDB driver for its client. A cell at the defaults has none.
|
|
774
|
-
*/
|
|
775
|
-
readonly driverOptions?: Readonly<Record<string, unknown>>;
|
|
776
|
-
/** This write concern is the w of each write of the MongoDB client. Without it, it is majority. */
|
|
777
|
-
readonly writeConcern?: "majority" | 1;
|
|
778
|
-
/** This flag makes the fault hold before the client starts. The client then meets it at its first selection. */
|
|
779
|
-
readonly before?: boolean;
|
|
780
|
-
/** This count is the number of runs of the cell (11), across new environments (two at least). */
|
|
781
|
-
readonly runs: number;
|
|
782
|
-
readonly environments: number;
|
|
783
|
-
/**
|
|
784
|
-
* This count is the number of environments at the same time, each with its own prober. Without
|
|
785
|
-
* it, the count is one. The calibration does its reference cells at 1, 4 and 8, to find how
|
|
786
|
-
* many environments the machine holds before its noise increases.
|
|
787
|
-
*/
|
|
788
|
-
readonly concurrency?: number;
|
|
789
|
-
/**
|
|
790
|
-
* This time is δ_abs of the environment of the cell: the noise of the pipeline. Each band includes
|
|
791
|
-
* it, and a timer must be at least that late to make a run void. Stage 0 measures it in each
|
|
792
|
-
* environment. Without it, the cell gets `NOISE`, the δ_abs of the first environment (4 ms).
|
|
793
|
-
*/
|
|
794
|
-
readonly noise?: Quantity;
|
|
795
|
-
}
|
|
796
|
-
/** A hop place is a hop of a topology, with the side that the rules of a fault face. */
|
|
797
|
-
interface HopPlace {
|
|
798
|
-
readonly hop: string;
|
|
799
|
-
readonly toward: "client" | "target";
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* A fault place is the namespace that gets the rules of a fault. "target" and "client" are the two
|
|
803
|
-
* ends. A hop place is a hop, with the side that the rules face. That side is the next hop toward
|
|
804
|
-
* the client, or the next hop toward the target. The rules of a proxy act on its sockets. The
|
|
805
|
-
* rules of a router act on what it forwards, by its device toward that side: the FORWARD chain.
|
|
806
|
-
*
|
|
807
|
-
* A group place is a part of a group, by its role.
|
|
808
|
-
*/
|
|
809
|
-
type FaultPlace = "target" | "client" | HopPlace | GroupPlace;
|
|
810
|
-
/** This function tells if a fault place is a hop of a topology. */
|
|
811
|
-
export declare const isHopPlace: (place: FaultPlace | undefined) => place is HopPlace;
|
|
812
|
-
/**
|
|
813
|
-
* This function gives the latest end of a band in seconds, from the reply of the client. It is
|
|
814
|
-
* the high bound, after the latest reference of the band (`startsBy`).
|
|
815
|
-
*/
|
|
816
|
-
export declare const latestEndOf: (prediction: Extract<Prediction, {
|
|
817
|
-
readonly detects: true;
|
|
818
|
-
}>) => number;
|
|
819
|
-
/** A middlebox event is one line of the router: a change of a conntrack entry, or a reset that it sent. `t` is CLOCK_MONOTONIC in nanoseconds. */
|
|
820
|
-
interface MiddleboxEvent {
|
|
821
|
-
readonly ev: string;
|
|
822
|
-
readonly t: number;
|
|
823
|
-
readonly [field: string]: unknown;
|
|
824
|
-
}
|
|
825
|
-
/** A probe event is one line that the client wrote. `t` is CLOCK_MONOTONIC in nanoseconds: an instant, not an amount. */
|
|
826
|
-
interface ProbeEvent {
|
|
827
|
-
readonly ev: string;
|
|
828
|
-
readonly t: number;
|
|
829
|
-
readonly [field: string]: unknown;
|
|
830
|
-
}
|
|
831
|
-
/** A run is one run of a cell, as the harness records it. */
|
|
832
|
-
interface Run {
|
|
833
|
-
readonly environment: number;
|
|
834
|
-
readonly index: number;
|
|
835
|
-
/**
|
|
836
|
-
* This flag marks the warm-up of an environment. It occurs before the counted runs, and the
|
|
837
|
-
* verdict does not count it. On a loaded machine, a new environment is sometimes slow at first.
|
|
838
|
-
*/
|
|
839
|
-
readonly warmup?: true;
|
|
840
|
-
readonly events: readonly ProbeEvent[];
|
|
841
|
-
/** This bracket is the time of the injector around the commit of the fault, on the same clock. It is null for a freeze. */
|
|
842
|
-
readonly fault: {
|
|
843
|
-
readonly t0: number;
|
|
844
|
-
readonly t1: number;
|
|
845
|
-
} | null;
|
|
846
|
-
/** This bracket is the time around the commit that stopped a stall. */
|
|
847
|
-
readonly heal?: {
|
|
848
|
-
readonly t0: number;
|
|
849
|
-
readonly t1: number;
|
|
850
|
-
} | null;
|
|
851
|
-
/** These are the records of the prober from the start to the end of the run, in the two namespaces. */
|
|
852
|
-
readonly kernel: readonly KernelRecord[];
|
|
853
|
-
/** This inode identifies the network namespace of the client, thus the records of the client. */
|
|
854
|
-
readonly netns: number;
|
|
855
|
-
/** This inode identifies the namespace of the target, where the records of its server socket are. */
|
|
856
|
-
readonly targetNetns: number;
|
|
857
|
-
/**
|
|
858
|
-
* This count is the number of records that the prober lost in the run. One lost record makes
|
|
859
|
-
* the run void. Null also makes the run void: no clock line came after the run to tell the count.
|
|
860
|
-
*/
|
|
861
|
-
readonly lost: number | null;
|
|
862
|
-
/**
|
|
863
|
-
* This rate is the HZ of the kernel of the environment, from its manifest. With it, the rule of a
|
|
864
|
-
* late timer is in time. A run without it keeps the rule in jiffies, as the runs before 0.9.0.
|
|
865
|
-
*/
|
|
866
|
-
readonly hz?: number;
|
|
867
|
-
/** These are the addresses and the namespaces of a topology, which the measurement of a run reads. */
|
|
868
|
-
readonly topology?: RunTopology;
|
|
869
|
-
/** These are the lines of the routers of a topology from the start to the end of the run. */
|
|
870
|
-
readonly middlebox?: readonly MiddleboxEvent[];
|
|
871
|
-
/** This record is the group of a group cell: its parts, and what it did in the run. */
|
|
872
|
-
readonly group?: RunGroup;
|
|
873
|
-
/** These are the lines of a target that writes them (`Target.lines`), from the start to the end of the run. */
|
|
874
|
-
readonly server?: readonly ProbeEvent[];
|
|
875
|
-
}
|
|
876
|
-
/** A Sentinel event is one line of the observer of a group: an event that a Sentinel published, on the clock of the VM. */
|
|
877
|
-
interface SentinelEvent {
|
|
878
|
-
readonly ev: string;
|
|
879
|
-
readonly t: number;
|
|
880
|
-
/** This text is the address and port of the Sentinel. */
|
|
881
|
-
readonly sentinel?: string;
|
|
882
|
-
/** This name is the event, for example `+switch-master`. */
|
|
883
|
-
readonly event?: string;
|
|
884
|
-
/** This text is the detail of the event, as the Sentinel wrote it. */
|
|
885
|
-
readonly detail?: string;
|
|
886
|
-
readonly [field: string]: unknown;
|
|
887
|
-
}
|
|
888
|
-
/** A part is one member or Sentinel of a group, as a run found it: its address and its network namespace. */
|
|
889
|
-
interface RunPart {
|
|
890
|
-
readonly ip: string;
|
|
891
|
-
readonly netns: number;
|
|
892
|
-
}
|
|
893
|
-
/** A run group is the group of a run: its parts, the primary before and after, the timeline, and the writes that it kept. */
|
|
894
|
-
interface RunGroup {
|
|
895
|
-
readonly members: Readonly<Record<string, RunPart>>;
|
|
896
|
-
readonly sentinels: Readonly<Record<string, RunPart>>;
|
|
897
|
-
/** This name is the member that was the primary at the start of the run. */
|
|
898
|
-
readonly primary: string;
|
|
899
|
-
/** This name is the part that got the fault, or null for a fault on the whole group. */
|
|
900
|
-
readonly at: string | null;
|
|
901
|
-
/**
|
|
902
|
-
* These are the lines of the timeline from the start to the end of the run. For a group under
|
|
903
|
-
* Sentinels, they are the lines of the observer of the Sentinels. For a replica set, they are
|
|
904
|
-
* the log lines of the members (`ev` "mongod"), with their times on the monotonic clock.
|
|
905
|
-
*/
|
|
906
|
-
readonly timeline: readonly SentinelEvent[];
|
|
907
|
-
/** This name is the member that was the primary when the group converged after the run, or null when it did not converge. */
|
|
908
|
-
readonly after: string | null;
|
|
909
|
-
/** These are the sequence numbers that the group holds after the run, when it converged, or null. */
|
|
910
|
-
readonly holds: readonly number[] | null;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* A run topology tells where each socket of a run is, in a topology:
|
|
914
|
-
* - `targetPeer` is the address of the peer of the target, as the target sees it: the address of
|
|
915
|
-
* the last hop.
|
|
916
|
-
* - `hops` are the network namespaces of the hops, by their names, with the address of the peer of
|
|
917
|
-
* each hop on each side.
|
|
918
|
-
*/
|
|
919
|
-
interface RunTopology {
|
|
920
|
-
readonly targetPeer: string;
|
|
921
|
-
readonly hops: Readonly<Record<string, {
|
|
922
|
-
readonly netns: number;
|
|
923
|
-
readonly client: string;
|
|
924
|
-
readonly target: string;
|
|
925
|
-
}>>;
|
|
926
|
-
}
|
|
927
|
-
//#endregion
|
|
928
4
|
//#region src/application.d.ts
|
|
929
5
|
/**
|
|
930
6
|
* A program event is a line of the program of the observer, with the kernel's stamp of its act.
|
|
@@ -1567,24 +643,6 @@ export declare const verdictOf: (prediction: Prediction, runs: readonly Measured
|
|
|
1567
643
|
export declare const groupVerdictOf: (prediction: Prediction, counted: readonly Measured[], delta?: Quantity) => GroupVerdict;
|
|
1568
644
|
//#endregion
|
|
1569
645
|
//#region src/lab.d.ts
|
|
1570
|
-
/** This function gives the image of the harness. */
|
|
1571
|
-
export declare const harnessImage: () => Promise<string>;
|
|
1572
|
-
/** This function gives the image of the Node client. */
|
|
1573
|
-
export declare const nodeClientImage: () => Promise<string>;
|
|
1574
|
-
/** This function gives the image of the router. */
|
|
1575
|
-
export declare const routerImage: () => Promise<string>;
|
|
1576
|
-
/** This function gives the image of the Go HTTP client. */
|
|
1577
|
-
export declare const goHttpImage: () => Promise<string>;
|
|
1578
|
-
/** This function gives the image of the Node HTTP clients. */
|
|
1579
|
-
export declare const nodeHttpImage: () => Promise<string>;
|
|
1580
|
-
/** This function gives the image of the MongoDB client. */
|
|
1581
|
-
export declare const mongoClientImage: () => Promise<string>;
|
|
1582
|
-
/** This function gives the image of the PostgreSQL client. */
|
|
1583
|
-
export declare const pgClientImage: () => Promise<string>;
|
|
1584
|
-
/** This function gives the image of `@procedures/client`: its WebSocket client and its server. */
|
|
1585
|
-
export declare const proceduresImage: () => Promise<string>;
|
|
1586
|
-
/** This function gives the image that a target operates: its stock image, or an image of the harness (`Target.harness`). */
|
|
1587
|
-
export declare const targetImageOf: (target: Target) => Promise<string>;
|
|
1588
646
|
/**
|
|
1589
647
|
* This time is the interval of the listing of a router, when its hop does not set one. A listing
|
|
1590
648
|
* evicts each expired flow that it walks past, and the DESTROY event of that flow follows.
|
|
@@ -1647,6 +705,8 @@ interface Manifest {
|
|
|
1647
705
|
/** This record is the target, and its settings as it read them back. */
|
|
1648
706
|
readonly target: {
|
|
1649
707
|
readonly image: string;
|
|
708
|
+
/** This source is the image of the subject that the target operates (`Target.subject`), with its stock base. */
|
|
709
|
+
readonly subject?: ImageSource;
|
|
1650
710
|
/** This name is the image of the harness that the target operates, with its stock base (`Target.harness`). */
|
|
1651
711
|
readonly harness?: string;
|
|
1652
712
|
readonly base?: string;
|
|
@@ -1664,10 +724,14 @@ interface Manifest {
|
|
|
1664
724
|
readonly id: string;
|
|
1665
725
|
readonly packages: string[];
|
|
1666
726
|
};
|
|
1667
|
-
/**
|
|
727
|
+
/**
|
|
728
|
+
* This record is the client of each run: the TCP client of the harness, a driver, or an image that
|
|
729
|
+
* the cell gives. `source` is the source of its image, when it is not a stock image by its name.
|
|
730
|
+
*/
|
|
1668
731
|
readonly client: {
|
|
1669
732
|
readonly kind: Client | "image";
|
|
1670
733
|
readonly image: string;
|
|
734
|
+
readonly source?: ImageSource;
|
|
1671
735
|
};
|
|
1672
736
|
/** These are the namespaces that the prober watched, by inode. */
|
|
1673
737
|
readonly netns: {
|
|
@@ -1901,6 +965,114 @@ export declare const deviceOf: (route: string) => string;
|
|
|
1901
965
|
*/
|
|
1902
966
|
export declare const openLab: (target: Target, kind?: Client | ClientImage, topology?: Topology) => Promise<Lab>;
|
|
1903
967
|
//#endregion
|
|
968
|
+
//#region src/image.d.ts
|
|
969
|
+
/** These are the names of the images that the harness ships. */
|
|
970
|
+
export declare const SHIPPED_NAMES: readonly [Shipped, ...Shipped[]];
|
|
971
|
+
/**
|
|
972
|
+
* These are the subjects that the harness ships, by their names. `procedures` is
|
|
973
|
+
* `@procedures/client` on Node: its WebSocket client (`client-ws.mjs`) and its server
|
|
974
|
+
* (`server-ws.mjs`), from one image. Thus the client and the server use one release.
|
|
975
|
+
*/
|
|
976
|
+
export declare const SUBJECTS: Readonly<Record<"procedures", Subject>>;
|
|
977
|
+
/**
|
|
978
|
+
* These are the clients that the harness ships, by their names (`Client`): the image of each, and
|
|
979
|
+
* its command. A cell that names a client gets this image and this command.
|
|
980
|
+
*/
|
|
981
|
+
export declare const SHIPPED_CLIENTS: Readonly<Record<Client, ClientImage>>;
|
|
982
|
+
/** These are the names of the clients that the harness ships. */
|
|
983
|
+
export declare const CLIENT_NAMES: readonly [Client, ...Client[]];
|
|
984
|
+
/** This function gives the command of a program of a subject by its role. It fails when the subject has no such program. */
|
|
985
|
+
export declare const programOf: (subject: Subject, role: string) => readonly string[];
|
|
986
|
+
/**
|
|
987
|
+
* This function gives the client of a subject for a cell (`Cell.client`): the image of the subject,
|
|
988
|
+
* with the command of a program. A client that the harness ships goes by its name, thus its records
|
|
989
|
+
* stay the same.
|
|
990
|
+
*/
|
|
991
|
+
export declare const subjectClient: (subject: Subject, role?: string) => Client | ClientImage;
|
|
992
|
+
/** This pattern matches an image pinned by digest: a name, a tag or none, then `@sha256:` and 64 hex digits. */
|
|
993
|
+
export declare const PINNED: RegExp;
|
|
994
|
+
/** This pattern matches the repository of a tag that the harness builds. Its parts are lower case, with `/` between them. */
|
|
995
|
+
export declare const REPOSITORY: RegExp;
|
|
996
|
+
/** This function tells if a path stays in its context: relative, with `/` between its parts, and no `..`. */
|
|
997
|
+
export declare const inContext: (path: string) => boolean;
|
|
998
|
+
/**
|
|
999
|
+
* This function gives the problems of the source of an image, as data. A pinned image names a
|
|
1000
|
+
* digest. A build names a repository, a context, and paths that stay in the context. A shipped image
|
|
1001
|
+
* is one that the harness ships.
|
|
1002
|
+
*/
|
|
1003
|
+
export declare const imageProblems: (source: ImageSource) => string[];
|
|
1004
|
+
/**
|
|
1005
|
+
* This function gives the problems of a subject, as data. A subject has a name and a base that a
|
|
1006
|
+
* digest pins. Its image source has no problems, and each of its programs is a command.
|
|
1007
|
+
*/
|
|
1008
|
+
export declare const subjectProblems: (subject: Subject) => string[];
|
|
1009
|
+
/**
|
|
1010
|
+
* This function gives each `FROM` of a Dockerfile that no digest pins. A `FROM` of an earlier stage
|
|
1011
|
+
* by its name, or of `scratch`, needs no digest. A base from an `ARG` has no digest that the harness
|
|
1012
|
+
* can read, thus it is in the list too.
|
|
1013
|
+
*/
|
|
1014
|
+
export declare const unpinnedBases: (dockerfile: string) => string[];
|
|
1015
|
+
/**
|
|
1016
|
+
* This function gives each manifest of packages in a context (`package.json`, `Cargo.toml`) that
|
|
1017
|
+
* has no lockfile in its folder or in a folder above it. The paths are the paths in the context.
|
|
1018
|
+
*/
|
|
1019
|
+
export declare const unlockedManifests: (paths: readonly string[]) => string[];
|
|
1020
|
+
/**
|
|
1021
|
+
* An image plan tells how the harness gets the image of a source. It is a pull of an image by its
|
|
1022
|
+
* name, or a build of a context. A build has its tag, its Dockerfile, and each file with its path.
|
|
1023
|
+
*/
|
|
1024
|
+
type ImagePlan = {
|
|
1025
|
+
readonly kind: "pull";
|
|
1026
|
+
readonly image: string;
|
|
1027
|
+
} | {
|
|
1028
|
+
readonly kind: "build";
|
|
1029
|
+
readonly tag: string;
|
|
1030
|
+
readonly dockerfile: string;
|
|
1031
|
+
readonly files: ReadonlyArray<{
|
|
1032
|
+
readonly file: string;
|
|
1033
|
+
readonly at: string;
|
|
1034
|
+
}>;
|
|
1035
|
+
};
|
|
1036
|
+
/**
|
|
1037
|
+
* This function gives the plan of the image of a source. A stock image by its name, or a pinned
|
|
1038
|
+
* image, is a pull. A build or a shipped image is a build. Its tag is its name, then 12 digits of a
|
|
1039
|
+
* sha256. The sha256 reads the path of the Dockerfile, and the path and the content of each file.
|
|
1040
|
+
* Thus a changed program cannot operate as an old one.
|
|
1041
|
+
*
|
|
1042
|
+
* A build fails before it starts on a problem of its source. It also fails on a `FROM` that no
|
|
1043
|
+
* digest pins, and on a manifest of packages without a lockfile.
|
|
1044
|
+
*/
|
|
1045
|
+
export declare const planOf: (source: string | ImageSource) => ImagePlan;
|
|
1046
|
+
/**
|
|
1047
|
+
* This function gives an image that a lab can start, from its source. It is the name of a stock
|
|
1048
|
+
* image or of a pinned image, which the lab pulls, or the tag of a build. This function loads
|
|
1049
|
+
* Testcontainers only for a build.
|
|
1050
|
+
*/
|
|
1051
|
+
export declare const imageOf: (source: string | ImageSource) => Promise<string>;
|
|
1052
|
+
/** This function gives the image of the harness: the prober, the TCP client, the injector and the namespace admin. */
|
|
1053
|
+
export declare const harnessImage: () => Promise<string>;
|
|
1054
|
+
/** This function gives the image of the Node client. */
|
|
1055
|
+
export declare const nodeClientImage: () => Promise<string>;
|
|
1056
|
+
/** This function gives the image of the router. */
|
|
1057
|
+
export declare const routerImage: () => Promise<string>;
|
|
1058
|
+
/** This function gives the image of the Go HTTP client. */
|
|
1059
|
+
export declare const goHttpImage: () => Promise<string>;
|
|
1060
|
+
/** This function gives the image of the Node HTTP clients. */
|
|
1061
|
+
export declare const nodeHttpImage: () => Promise<string>;
|
|
1062
|
+
/** This function gives the image of the MongoDB client. */
|
|
1063
|
+
export declare const mongoClientImage: () => Promise<string>;
|
|
1064
|
+
/** This function gives the image of the PostgreSQL client. */
|
|
1065
|
+
export declare const pgClientImage: () => Promise<string>;
|
|
1066
|
+
/** This function gives the image of the procedures subject: the WebSocket client of `@procedures/client`, and its server. */
|
|
1067
|
+
export declare const proceduresImage: () => Promise<string>;
|
|
1068
|
+
/**
|
|
1069
|
+
* This function gives the source of the image that a target operates. It is the image of its
|
|
1070
|
+
* subject (`Target.subject`), a shipped image by its short form (`Target.harness`), or its stock image.
|
|
1071
|
+
*/
|
|
1072
|
+
export declare const targetSourceOf: (target: Target) => string | ImageSource;
|
|
1073
|
+
/** This function gives the image that a target operates: the image of its subject, or its stock image. */
|
|
1074
|
+
export declare const targetImageOf: (target: Target) => Promise<string>;
|
|
1075
|
+
//#endregion
|
|
1904
1076
|
//#region src/group.d.ts
|
|
1905
1077
|
/**
|
|
1906
1078
|
* This module is the lab of a replicated group: a primary and its replicas, and the Sentinels
|
|
@@ -2235,5 +1407,5 @@ export declare const spread: (runs: number, environments: number) => number[];
|
|
|
2235
1407
|
*/
|
|
2236
1408
|
export declare const runCell: (cell: Cell, say?: (line: string) => void) => Promise<CellResult>;
|
|
2237
1409
|
//#endregion
|
|
2238
|
-
export type
|
|
1410
|
+
export { type Agent, type BuildImage, type CallReading, type Cell, type CellResult, type Client, type ClientImage, type Crossings, type Cut, type Decision, type DriverBand, type DriverSocket, type DriverStep, type DriverStepTime, type ErrorOnTheWay, type Fault, type FaultPlace, type FaultSide, type Group, type GroupClient, type GroupLab, type GroupMeasured, type GroupNetworkFault, type GroupPlace, type GroupPrediction, type GroupReading, type GroupRole, type GroupVerdict, type GroupView, type HarnessImage, type Hop, type HopPlace, type HttpProbe, type ImagePlan, type ImageSource, type Interval, type KernelRecord, type Lab, type LineMatch, type Manifest, type ManifestHop, type Measured, type MemberLine, type MiddleboxEvent, type MiddleboxExpectation, type MiddleboxForm, type NetworkFault, type Observer, type Outcome, type PinnedImage, type Prediction, type Probe, type ProbeEvent, type ProgramEvent, type ProxyHop, type ProxyTime, type ReconnectReading, type ReconnectVerdict, type Reconnects, type Recovers, type Reference, type Reordering, type ReplicaSet, type ReplicaSetLab, type ReplicaSetStage, type Replies, type RequestPrediction, type RequestReading, type RouterHop, type RttRange, type Run, type RunGroup, type RunPart, type RunTopology, type SentinelEvent, type SentinelStage, type Shipped, type ShippedImage, type SocketPlace, type Spread, type Stage, type StageBand, type StageVerdict, type Stamp, type Status, type Subject, type Target, type Topology, type Toxic, type Verdict, type Writes, type WsProbe, isHopPlace, latestEndOf };
|
|
2239
1411
|
//# sourceMappingURL=index.d.ts.map
|