MuseClient
Your entry point to the SDK.
Spawn a host with MuseClient.spawn, then open conversations with
startSession or resumeSession. The client owns the connection: it
routes every server event to the session it belongs to and reports a host
death to all of them. Call close to shut the host down cleanly.
Properties
Section titled “Properties”| Property | Type | Stability | Presence | Description |
|---|---|---|---|---|
durability |
SessionDurabilityProfile |
required | The durability profile every session this client opens inherits. | |
exit |
Promise<ExitClassification> |
required | The host’s exit row, when this client was built by spawn. |
|
initializeResult |
InitializeResult |
required | The handshake result, when this client was built by spawn. |
Methods
Section titled “Methods”| Method | Signature | Stability | Description |
|---|---|---|---|
constructor |
new MuseClient(connection: Connection, options: MuseClientOptions) |
||
close |
close(): Promise<void> |
Shut the host down in an orderly way; the shutdown this causes is not reported to your sessions as a host death. | |
resumeSession |
resumeSession(options: ResumeSessionOptions): Promise<Session<unknown>> |
Load an existing session and subscribe this connection to its view. | |
startSession |
startSession(options?: StartSessionOptions): Promise<Session<unknown>> |
Open a new root session. | |
spawn |
static spawn(options: MuseClientSpawnOptions): Promise<MuseClient> |
Spawn an owned host, run the handshake, and hand back a client whose durability profile came from that handshake. |
Source
clients/sdk-ts/src/facade/client.ts:151
{ "kind": "Class", "canonicalPath": "MuseClient"}