hellhound.system.core

All the functions for managing system state live in this namespace. You won’t need to use this namespace directly unless you really know what’s your doing.

components-map

(components-map system-map)

Returns a map of components from the given system. Basically the return value of this function would be index of components.

conform-component

(conform-component component)

Checks for a valid compnoent structure and returns a pair of component name and the component structure.

context-for

(context-for system-map component)

Returns the context map for the given component in the given system-map.

Basically concext map contains the following keys:

  • :dependencies: A vector of running components which the current component is depends on.

  • :dependencies-map: A map of component names as keys and running components as values. All the components are the dependencies of the given component.

NOTE: for more info checkout the guides for Context Map.

get-dependencies-of

(get-dependencies-of system-map component)

Returns a vector of dependencies for the given component ins the given system.

get-system

(get-system)

A shortcut function for derefing system.

set-system!

(set-system! system-map)

Sets the system of HellHound.

start-component!

(start-component! system-map component)

Starts the given component of the given system.

start-system!

added in 1.0

(start-system! system-map)

Starts the given system-map.

TODO: More explaination.

stop-component!

(stop-component! system-map component)

Stops the given component of the given system.

stop-system!

added in 1.0

(stop-system! system-map)

Stops the given system-map.

TODO: More explaination

system

update-system-components

(update-system-components system-map)

Replace the components vector of an unprocessed system with the indexed version of the vector which is map.