Documentation
    Preparing search index...
    Index

    Constructors

    Properties

    _datacenters: Datacenters | undefined
    _health: Health | undefined
    _namespaces: Namespaces | undefined
    _options: Options
    _runners: Runners | undefined

    Accessors

    • get datacenters(): Datacenters

      Returns Datacenters

    • get health(): Health

      Returns Health

    • get namespaces(): Namespaces

      Returns Namespaces

    • get runners(): Runners

      Returns Runners

    Methods

    • Returns Promise<string>

    • If actor is created in the current datacenter:

      2 round trips:

      • namespace::ops::resolve_for_name_global
      • [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)

      If actor is created in a different datacenter:

      3 round trips:

      • namespace::ops::resolve_for_name_global
      • POST /actors to remote datacenter
      • [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)

      actor::get will always be in the same datacenter.

      Parameters

      Returns Promise<Rivet.ActorsCreateResponse>

      await client.actorsCreate({
      namespace: "namespace",
      crashPolicy: "restart",
      name: "name",
      runnerNameSelector: "runner_name_selector"
      })
    • If actor exists

      2 round trips:

      • namespace::ops::resolve_for_name_global
      • GET /actors/{}

      If actor does not exist and is created in the current datacenter:

      2 round trips:

      • namespace::ops::resolve_for_name_global
      • [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)

      If actor does not exist and is created in a different datacenter:

      3 round trips:

      • namespace::ops::resolve_for_name_global
      • POST /actors to remote datacenter
      • [pegboard::workflows::actor] Create actor workflow (includes Epoxy key allocation)

      actor::get will always be in the same datacenter.

      Parameters

      Returns Promise<Rivet.ActorsGetOrCreateResponse>

      await client.actorsGetOrCreate({
      namespace: "namespace",
      crashPolicy: "restart",
      key: "key",
      name: "name",
      runnerNameSelector: "runner_name_selector"
      })
    • If key is some & include_destroyed is false

      2 round trips:

      • namespace::ops::resolve_for_name_global

      • GET /actors (multiple DCs based on actor IDs)

        This path is optimized because we can read the actor IDs fro the key directly from Epoxy with stale consistency to determine which datacenter the actor lives in. Under most circumstances, this means we don't need to fan out to all datacenters (like normal list does).

        The reason include_destroyed has to be false is Epoxy only stores currently active actors. If include_destroyed is true, we show all previous iterations of actors with the same key.

      Otherwise

      2 round trips:

      • namespace::ops::resolve_for_name_global
      • GET /actors (fanout)

      Parameters

      Returns Promise<Rivet.ActorsListResponse>

      await client.actorsList({
      namespace: "namespace"
      })