A session as a successor calls it: EVERY member it uses on a shell another generation made,
which is everything this module calls on a shell. retarget and adopt are part of it so that
a build whose sessions cannot be told a new password or a new host has a different shape and is
never adopted — its sessions are closed with their group and the machines held afresh.
API
@Interface("@prismshadow/penguin-server#MachineSession")
export abstract class MachineSession {
abstract hold(): void;
abstract held(): boolean;
abstract retarget(target: RemoteTarget): void;
abstract adopt(host: ShellHost): void;
abstract run(command: string, opts?: ShellRunOptions): Promise<ShellResult>;
abstract session(): ShellSession | null;
abstract close(): void;
}Members (7)
hold
hold(): void@returns
voidheld
held(): boolean@returns
booleanretarget
retarget(target: RemoteTarget): voidThe latest caller's word on how to reach the machine; read when the next session opens.
@paramtarget
RemoteTarget@returns
voidadopt
adopt(host: ShellHost): voidFrom here on, reports to and signs in through host: the generation that keeps it.
@paramhost
ShellHost@returns
voidrun
run(command: string, opts?: ShellRunOptions): Promise<ShellResult>@paramcommand
string@paramopts?
ShellRunOptions@returns
Promise<ShellResult>session
session(): ShellSession | null@returns
ShellSession | nullclose
close(): void@returns
void