View Source Divo.Stack behaviour (divo v2.0.0)

Implements a behaviour for importing predefined compose stacks from external library complementary to divo for quickly standing up well-defined services with little variation in configuration.

Link to this section Summary

Callbacks

Defines the behaviour that must be implemented to supply configs from external modules to divo. The configuration values are expected as a keyword list of attributes specific to each module adopting the behaviour.

Functions

Iterates over modules supplied in the app :divo config, calling the gen_stack function on each module's implementation of the behavior, collecting the resulting maps into a single map and passing the accumulated result out for writing out the file.

Link to this section Callbacks

@callback gen_stack(keyword()) :: {atom(), map()}

Defines the behaviour that must be implemented to supply configs from external modules to divo. The configuration values are expected as a keyword list of attributes specific to each module adopting the behaviour.

Link to this section Functions

@spec concat_compose([tuple()]) :: map()

Iterates over modules supplied in the app :divo config, calling the gen_stack function on each module's implementation of the behavior, collecting the resulting maps into a single map and passing the accumulated result out for writing out the file.