Galaxy v0.3.0 Galaxy.Cluster behaviour View Source

Defines a cluster.

Link to this section Summary

Callbacks

A callback executed when the repo starts or when configuration is read. The first argument is the context the callback is being invoked. If it is called because the Repo supervisor is starting, it will be :supervisor. It will be :runtime if it is called for reading configuration without actually starting a process. The second argument is the repository configuration as stored in the application environment. It must return {:ok, keyword} with the updated list of configuration or :ignore (only in the :supervisor case).

Link to this section Types

Link to this section Callbacks

Link to this callback

init(atom, config)

View Source (optional)
init(:supervisor, config :: Keyword.t()) :: {:ok, Keyword.t()} | :ignore

A callback executed when the repo starts or when configuration is read. The first argument is the context the callback is being invoked. If it is called because the Repo supervisor is starting, it will be :supervisor. It will be :runtime if it is called for reading configuration without actually starting a process. The second argument is the repository configuration as stored in the application environment. It must return {:ok, keyword} with the updated list of configuration or :ignore (only in the :supervisor case).