nomad v0.7.0 Nomad.SQL

Interface for the Nomad SQL API. All the functions here will call their respective callbacks to the desired cloud’s client adapter.

To use the SQL API - at least - the following system variables must be passed on startup:

DB_NAME: The name of the database DB_INSTANCE: The instance to which the database belongs DB_USERNAME: The username for the given database DB_PASSWORD: The password for the given database

The hostname will be retrieved through the API.

To use the SQL API and the regular Ecto Mix tasks:

DB_NAME: The name of the database DB_INSTANCE: The instance to which the database belongs DB_USERNAME: The username for the given database DB_PASSWORD: The password for the given database DB_HOSTNAME: The host for the given database instance

Summary

Functions

delete_instance(instance, fun \\ &Client.delete_instance/1)
delete_instance!(instance, fun \\ &Client.delete_instance/1)
get_instance(instance, fun \\ &Client.get_instance/1)
get_instance!(instance, fun \\ &Client.get_instance/1)
get_instance_address(instance, fun \\ &Client.get_instance/1)
insert_instance(instance, settings, arg1, arg2, addresses \\ [], fun \\ &Client.insert_instance/4)
insert_instance!(instance, settings, arg1, arg2, addresses \\ [], fun \\ &Client.insert_instance/4)
list_classes(fun \\ &Client.list_tiers/0)
list_databases(instance, fun \\ &Client.list_databases/1)
list_databases!(instance, fun \\ &Client.list_databases/1)
list_instances(fun \\ &Client.list_instances/0)
list_instances!(fun \\ &Client.list_instances/0)
restart_instance(instance, fun \\ &Client.restart_instance/1)
restart_instance!(instance, fun \\ &Client.restart_instance/1)
set_database_host(app_name, module)

Specs

set_database_host(atom, atom) :: :ok

Sets the database host (for Ecto).