Class Lighthouse

A connection to the lighthouse.

Hierarchy

  • Lighthouse

Constructors

Properties

auth: any
coder: any
handle: any

Handles a server message.

isClosed: any

Whether the transport has been closed.

logger: any
outOfOrderMessages: any

Out-of-order received messages, e.g. if a response is faster than the response handler is registered.

receiveResponse: any
receiveSingle: any

Receives a response for the given request id.

receiveStreaming: any

Receives a stream of responses for the given request id.

requestId: any

The current request id. Automatically increments for every request.

responseHandlers: any

Handlers for response messages.

sendRequest: any

Sends a request.

transport: any

Methods

  • Returns Promise<void>

  • Creates a resource at the given path. Requires CREATE permission.

    Parameters

    • path: string[]

    Returns Promise<ServerMessage<unknown>>

  • Deletes a resource at the given path. Requires DELETE permission.

    Parameters

    • path: string[]

    Returns Promise<ServerMessage<unknown>>

  • Gets the resource at the given path. Requires READ permission.

    Parameters

    • path: string[]

    Returns Promise<ServerMessage<unknown>>

  • Links the given source to the given destination path. Requires WRITE permission for the destination and READ for the source.

    Parameters

    • srcPath: string[]
    • destPath: string[]

    Returns Promise<ServerMessage<unknown>>

  • Creates a directory at the given path. Requires CREATE permission.

    Parameters

    • path: string[]

    Returns Promise<ServerMessage<unknown>>

  • Performs a single request to the given path with the given payload.

    Type Parameters

    • T

    Parameters

    • verb: SingleVerb
    • path: string[]
    • Optional payload: T

    Returns Promise<ServerMessage<unknown>>

  • Combines PUT and CREATE. Requires CREATE and WRITE permission.

    Type Parameters

    • T

    Parameters

    • path: string[]
    • payload: T

    Returns Promise<ServerMessage<unknown>>

  • Updates the resource at the given path with the given payload. Requires WRITE permission.

    Type Parameters

    • T

    Parameters

    • path: string[]
    • payload: T

    Returns Promise<ServerMessage<unknown>>

  • Sends an input event to the user's input endpoint.

    Note that this is the new API which not all clients may support. If your client or library does not support this, you may need to use putModel with a LegacyInputEvent.

    Parameters

    Returns Promise<ServerMessage<unknown>>

  • Sends a frame or a legacy input event to the user's model.

    Parameters

    Returns Promise<ServerMessage<unknown>>

  • A promise that resolves once ready.

    Returns Promise<void>

  • Sends a client message.

    Type Parameters

    • P

    Parameters

    Returns Promise<void>

  • Performs a streaming request to the given path with the given payload.

    Type Parameters

    • T

    Parameters

    • path: string[]
    • Optional payload: T

    Returns AsyncIterable<ServerMessage<unknown>>

  • Streams the user's input (including e.g. key/controller events).

    Note that this is the new API which not all clients may support (in LUNA disabling the legacy mode will send events to this endpoint). If your client or library does not support this, you may need to streamModel and read LegacyInputEvents.

    Parameters

    • Optional user: string

    Returns Promise<AsyncIterable<ServerMessage<InputEvent>>>

  • Streams the user's model (including e.g. key/controller events).

    Parameters

    • Optional user: string

    Returns Promise<AsyncIterable<ServerMessage<unknown>>>

  • Unlinks the given source from the given destination path. Requires WRITE permission for the destination.

    Parameters

    • srcPath: string[]
    • destPath: string[]

    Returns Promise<ServerMessage<unknown>>

Generated using TypeDoc