Documentation / @etherfold/browser / HostDeath
Type Alias: HostDeath ​
HostDeath =
object
Defined in: packages/browser/src/host/restart.ts:68
A HOST DIED, as the tab is told.
Pushed at the app rather than inferred by it, because silence is the worst available outcome: a stalled app and a slow app look identical from the outside, and that is where "is it broken?" reports come from (ADR-0082).
It is deliberately NOT a PortPush. Every push on the envelope comes FROM the host, and a host that has stopped existing sends nothing -- this is the port's own report about the host, so it is the port's own subscription (IndexerPort.onHostDeath).
Properties ​
attempt ​
readonlyattempt:number
Defined in: packages/browser/src/host/restart.ts:79
WHICH CONSECUTIVE DEATH THIS IS, counting from 1.
The number an app renders as "this keeps happening": a host that stays alive for settledAfterInSeconds is SETTLED and the count starts again, so a 3 here means three deaths in quick succession rather than the third death since the tab opened.
cause ​
readonlycause:HostDeathCause
Defined in: packages/browser/src/host/restart.ts:70
HOW the port concluded it. See HostDeathCause.
rejected ​
readonlyrejected:number
Defined in: packages/browser/src/host/restart.ts:99
HOW MANY CALLS this death rejected: everything that was in flight when it was concluded.
Reported because it is the size of what the app has to do something about -- every one of those callers got an IndexerHostDiedError and may want to ask again.
restarting ​
readonlyrestarting:boolean
Defined in: packages/browser/src/host/restart.ts:88
Whether the port is starting another host.
false says nobody is coming, which is the state an app most needs to be able to render: either the restart budget is spent (a host that only ever dies is not made well by a fourth try, and a hot restart loop is its own hazard), or this hosting shape cannot be re-obtained at all.
restartInSeconds? ​
readonlyoptionalrestartInSeconds?:number
Defined in: packages/browser/src/host/restart.ts:90
How long the port waits before that restart. Absent where there is none.