Skip to content

Explain Core

chaos.lib.explain

handleExplain(payload, EXPLAIN_DISPATCHER)

Handles the resolution and fetching of explanations for provided topics.

Parameters:

Name Type Description Default
payload ExplainPayload

The payload containing the requested topics and desired complexity level.

required
EXPLAIN_DISPATCHER dict

A mapping of available roles to their specific explanation modules.

required

Returns:

Type Description
ResultPayload[dict[str, ExplainResult]]

ResultPayload[]: The result payload containing a dictionary of fetched explanations or list of subtopics on success, and any errors encountered during resolution.

Notes

Topics should be passed as either "role" or "role.sub_topic". If "role.list" is requested, it will list all available subtopics for that role.