Geolix.Storage.Metadata

Geolix metadata storage.

Usage

iex> set(:some_database_name, %Geolix.Metadata{ database_type: "doctest" })
:ok
iex> get(:some_database_name)
%Geolix.Metadata{ database_type: "doctest" }
iex> get(:some_database_name, :database_type)
"doctest"

iex> get(:unregistered_database)
nil
iex> get(:unregistered_database, :database_type)
nil
Source

Summary

get(database)

Fetches a metadata entry for a database

get(database, key)

Returns the value of the requested key from a metadata entry

registered()

Returns the names of all registered metadata entries

set(database, metadata)

Stores a set of metadata for a specific database

start_link()

Starts the metadata agent

Functions

get(database)

Specs:

Fetches a metadata entry for a database.

Source
get(database, key)

Specs:

  • get(atom, atom) :: any

Returns the value of the requested key from a metadata entry.

If either the key or the whole metadata entry are not found then nil will be returned.

Source
registered()

Specs:

  • registered :: list

Returns the names of all registered metadata entries.

Source
set(database, metadata)

Specs:

Stores a set of metadata for a specific database.

Source
start_link()

Specs:

Starts the metadata agent.

Source