# `PgFlow.FlowStarter.ModuleState`
[🔗](https://github.com/agoodway/pgflow/blob/v0.3.1/lib/pgflow/flow_starter.ex#L57)

Registration snapshot for one flow/job module, as returned by
`PgFlow.FlowStarter.module_status/1` and embedded in `status/0` results.

Tracks where the module is in the registration lifecycle (`:status`),
which phase it last executed (registry, worker start, DB notify setup,
notify registration), how many attempts have run, and the classified
last error, if any.

# `error_class`

```elixir
@type error_class() :: :transient | :permanent
```

# `phase`

```elixir
@type phase() :: :registry | :worker | :notify_db | :notify_register
```

# `status`

```elixir
@type status() :: :pending | :retrying | :succeeded | :failed_permanent
```

# `t`

```elixir
@type t() :: %PgFlow.FlowStarter.ModuleState{
  attempts: non_neg_integer(),
  last_error:
    nil
    | %{class: error_class(), phase: phase(), reason: term(), at: DateTime.t()},
  module: module(),
  status: status(),
  type: String.t(),
  updated_at: DateTime.t()
}
```

---

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