Geolix v0.11.0 Geolix.Adapter.Fake
Fake adapter for testing environments.
Summary
Functions
Returns the children to be supervised by Geolix.Database.Supervisor
Implementation of Geolix.Adapter.load_database/1
Looks up IP information
Functions
Returns the children to be supervised by Geolix.Database.Supervisor
.
If no automatic supervision should take place or it is intended to use a adapter specific supervisor (i.e. using the application config) this callback should be either unimplemented or return an empty list.
Callback implementation for Geolix.Adapter.database_workers/0
.
Implementation of Geolix.Adapter.load_database/1
.
Requires the parameter :data
to be a map with all database entries.
Each database entry is one entry in the map. The key should be an exact
IP address in a format returned by :inet.parse_address/1
while the result
can be any term.
Looks up IP information.
The passed opts
are expected to contain a key :where
to define
which database should be queried. If that key is not set then nil
should be returned instead.
Callback implementation for Geolix.Adapter.lookup/2
.