Oban.Pro.Cloud behaviour (Oban Pro v0.14.2)

A behaviour for interacting with cloud hosting providers.

Link to this section Summary

Callbacks

Executed once at runtime to gather, normalize, and transform options.

Called to horizontally scale a cloud resource up or down.

Link to this section Types

@type conf() :: term()
@type opts() :: keyword()
@type quantity() :: non_neg_integer()

Link to this section Callbacks

@callback init(opts()) :: conf()

Executed once at runtime to gather, normalize, and transform options.

Link to this callback

scale(quantity, conf)

@callback scale(quantity(), conf()) :: {:ok, conf()} | {:error, term()}

Called to horizontally scale a cloud resource up or down.

Successful scaling requests must return a new conf to be used during the next call to scale/2. That allows cloud modules to track responses for additional control and introspection.