ObanSentinel.Plugin (oban_sentinel v0.1.0)

Copy Markdown View Source

Oban plugin that turns job telemetry into worker-level circuit breaking.

The plugin attaches to Oban telemetry events for its configured instance and delegates all stateful work to ObanSentinel.CircuitBreaker.

Summary

Functions

Returns a specification to start this module under a supervisor.

Processes an Oban telemetry event without performing synchronous I/O.

Starts the plugin under Oban's plugin supervisor.

Validates Sentinel plugin options before Oban starts it.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

handle_event(arg1, measurements, metadata, breaker)

@spec handle_event([atom()], map(), map(), GenServer.server()) :: :ok

Processes an Oban telemetry event without performing synchronous I/O.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

Starts the plugin under Oban's plugin supervisor.

validate(opts)

@spec validate(keyword()) :: :ok | {:error, String.t()}

Validates Sentinel plugin options before Oban starts it.