nomad v0.6.0 NomadSQL behaviour

Summary

Callbacks

Deletes the given ‘instance’

Returns a tuple with info about the given ‘instance’ with the format: {instance_name, region, address, status, allocated_storage}

Returns the address for the given ‘instance’

Creates a new database instance with name ‘instance’, the provided ‘settings’ and in the desired pricing/performance ‘tier’

Lists all instance classes/tiers for the given cloud provier’s SQL service

Lists all the available databases in the given ‘instance’

Lists all database instances for the given cloud credentials. The function returns a list of tuples with the following format: {instance_name, region, address, status, allocated_storage}

Restarts the given ‘instance’

Callbacks

delete_instance(instance)

Specs

delete_instance(instance :: binary) :: :ok | binary

Deletes the given ‘instance’.

get_instance(instance)

Specs

get_instance(instance :: binary) :: map | binary

Returns a tuple with info about the given ‘instance’ with the format: {instance_name, region, address, status, allocated_storage}

get_instance_address(instance)

Specs

get_instance_address(instance :: binary) :: binary

Returns the address for the given ‘instance’.

insert_instance(instance, settings, {}, {}, addresses)

Specs

insert_instance(instance :: binary, settings :: map | list, {region :: binary, tier :: binary}, {user :: binary, password :: binary}, addresses :: list) ::
  :ok |
  binary

Creates a new database instance with name ‘instance’, the provided ‘settings’ and in the desired pricing/performance ‘tier’.

The ‘settings’ must be passed as a Map in the format: %{key: value}

list_classes()

Specs

list_classes :: [binary]

Lists all instance classes/tiers for the given cloud provier’s SQL service.

list_databases(instance)

Specs

list_databases(instance :: binary) ::
  [binary] |
  binary

Lists all the available databases in the given ‘instance’.

list_instances()

Specs

list_instances :: [tuple] | [] | binary

Lists all database instances for the given cloud credentials. The function returns a list of tuples with the following format: {instance_name, region, address, status, allocated_storage}

restart_instance(instance)

Specs

restart_instance(instance :: binary) :: :ok | binary

Restarts the given ‘instance’.