Jido.Signal.Router.Engine (Jido v1.1.0-rc.2)

View Source

The routing engine that matches signals to handlers.

Summary

Functions

Builds the trie structure from validated routes.

Collects all routes from the trie into a list of Route structs.

Counts total routes in the trie.

Removes a path from the trie.

Routes a signal through the trie to find matching handlers.

Functions

build_trie(routes, base_trie \\ %TrieNode{})

Builds the trie structure from validated routes.

collect_routes(trie)

Collects all routes from the trie into a list of Route structs.

count_routes(trie_node)

@spec count_routes(Jido.Signal.Router.TrieNode.t()) :: non_neg_integer()

Counts total routes in the trie.

dbug(_, _ \\ [])

(macro)

error(_, _ \\ [])

(macro)

remove_path(path, trie)

Removes a path from the trie.

route_signal(trie, signal)

@spec route_signal(Jido.Signal.Router.TrieNode.t(), Jido.Signal.t()) :: [term()]

Routes a signal through the trie to find matching handlers.