Aster TypeScript 0.3.893
    Preparing search index...

    Class AsterClientWrapper

    High-level Aster RPC client.

    Wraps connection setup, admission, and client stub creation. Supports reconnection with exponential backoff.

    Index

    Accessors

    • get connected(): boolean

      Whether the client is connected.

      Returns boolean

    • get services(): ServiceSummary[]

      Services discovered during admission.

      Returns ServiceSummary[]

    • get registryNamespace(): string | undefined

      Registry namespace ID for service discovery (set after admission).

      Returns string | undefined

    • get gossipTopic(): string

      Hex-encoded 32-byte gossip topic ID for the producer mesh.

      Returns string

    Constructors

    Methods

    • Connect to the server via consumer admission, then open an RPC transport.

      If the client was created with a transport, this is a no-op. If created with an address, it performs the full admission handshake.

      Returns Promise<void>

    • Create a typed client proxy for a service class.

      Type Parameters

      • T extends new (...args: any[]) => any

      Parameters

      • serviceClass: T

      Returns Promise<AsterClient<InstanceType<T>>>

    • Create a typed client proxy for a service class.

      Type Parameters

      • T extends new (...args: any[]) => any

      Parameters

      • serviceClass: T

      Returns AsterClient<InstanceType<T>>

    • Create a dynamic proxy client for a service.

      On the first call per service, fetches the producer's published manifest from the registry doc, synthesises request/response types via DynamicTypeFactory, and registers them with the Fory codec so proxy calls speak the same wire as the typed client. Subsequent proxy(sameName) calls reuse the cached registration.

      Parameters

      • serviceName: string

      Returns Promise<ProxyClient>

      const mc = await client.proxy("MissionControl");
      const result = await mc.getStatus({ agentId: "edge-1" });
      console.log(result.status);
    • Reconnect with exponential backoff.

      Parameters

      • connectFn: () => Promise<AsterTransport>
      • OptionalmaxAttempts: number

      Returns Promise<void>

    • Close the client, its transport and its node.

      Returns Promise<void>

    Properties

    config: AsterConfig