@aster-rpc/aster API Reference
    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.

      Parameters

      • serviceName: string

      Returns ProxyClient

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

      Parameters

      • connectFn: () => Promise<AsterTransport>
      • maxAttempts: number = 5

      Returns Promise<void>

    • Close the client and underlying transport.

      Returns Promise<void>

    Properties

    config: AsterConfig