magellan_microservice v0.1.4 MagellanMicroservice.AppStatus

This module handles the overall app-status. One can register a function which gets invoked when getStatus/0 is called to build the app-status.

Summary

Functions

A simple status represented by OK or ERROR

Retrieve all results of the stored status functions

This function returns the App-Status.get_status result endcoded in json

Use this function to store a function under a name. The function will be invoked when the app-status or health are requested

The App-Status consists of an Agent which stores the registered status function. Refer to Agent.start_link documentation

Functions

get_health()

Specs

get_health :: binary

A simple status represented by OK or ERROR.

get_status()

Specs

get_status :: any

Retrieve all results of the stored status functions.

get_status_json()

Specs

get_status_json :: any

This function returns the App-Status.get_status result endcoded in json.

register_status_fun(appName, fun)

Specs

register_status_fun(atom, any) :: any

Use this function to store a function under a name. The function will be invoked when the app-status or health are requested.

start_link()

Specs

start_link :: any

The App-Status consists of an Agent which stores the registered status function. Refer to Agent.start_link documentation.