# `RpcLoadBalancer.LoadBalancer.Pg`
[🔗](https://github.com/MikaAK/rpc_load_balancer/blob/main/lib/rpc_load_balancer/load_balancer/pg.ex#L1)

Wrapper around `:pg` used by `RpcLoadBalancer.LoadBalancer`.

Encapsulates the shared `:pg` group name and the patterns for reading
membership and fanning out RPC calls to remote members.

# `child_spec`

```elixir
@spec child_spec(any()) :: map()
```

# `multicall`

```elixir
@spec multicall(atom() | module(), module(), atom(), [any()], timeout()) :: [
  {node(), any()}
]
```

Runs `:erpc.multicall/5` against every remote member of the group
and returns `[{remote_node, result}]` pairs in membership order.

Empty-membership shortcut: returns `[]` without invoking `:erpc`.

# `pg_group_name`

```elixir
@spec pg_group_name() :: atom()
```

# `remote_members`

```elixir
@spec remote_members(atom() | module()) :: [node()]
```

Returns remote node names (non-local, deduplicated) registered for
the given load balancer.

# `start_link`

```elixir
@spec start_link(any()) :: {:ok, pid()} | {:error, any()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
