Shin.Reports (Shin v0.2.0) View Source
This module contains functions for converting the metrics data returned from a Shibboleth IdP into simplified maps of data.
Use Shin.metrics/1
or Shin.Metrics.query/1
to get the metrics data.
Link to this section Summary
Functions
A convenience function to produce a IdPInfo report (reformated "idp" metrics)
Produce the specified report using the provided metrics
Returns a list reporter aliases
Returns a map of reporter modules.
Returns a map of reporter aliases and modules.
A convenience function to produce a SystemInfo report (reformated "core" metrics)
Link to this section Functions
Specs
A convenience function to produce a IdPInfo report (reformated "idp" metrics)
Examples
Shin.Reports.idp(metrics)
# => {:ok, %Reports.IdPInfo{ ... }}
Specs
Produce the specified report using the provided metrics
The reporter can be an alias (an atom already know to Shin) or any suitable module.
Examples
Reports.produce(metrics, :system_info)
# => {:ok, %Shin.Reports.SystemInfo{ ... }}
Reports.produce(metrics, Shin.Reports.IdPInfo)
# => {:ok, %Reports.IdPInfo{ ... }}
Specs
reporter_aliases() :: list()
Returns a list reporter aliases
Examples
Shin.Reports.reporter_aliases
# => [:system_info, :idp_info]
Specs
reporter_modules() :: list()
Returns a map of reporter modules.
Examples
Shin.Reports.reporter_modules
# => [Shin.Reports.SystemInfo, Shin.Reports.IdPInfo]
Specs
reporters() :: map()
Returns a map of reporter aliases and modules.
Examples
Shin.Reports.reporters
# => %{system_info: Shin.Reports.SystemInfo, idp_info: Shin.Reports.IdPInfo}
Specs
A convenience function to produce a SystemInfo report (reformated "core" metrics)
Examples
Shin.Reports.system(metrics)
# => {:ok, %Reports.SystemInfo{cores: 4, ...}}