Oban.Pro.Cloud behaviour (Oban Pro v1.5.0-rc.6)

A behaviour for interacting with cloud hosting providers.

Summary

Callbacks

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

Called to horizontally scale a cloud resource up or down.

Types

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

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.