Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStatusFunc ¶
func RegisterStatusFunc(name string, fn StatusFunc) error
RegisterStatusFunc registers a subsystem and associates a status function to call for debug status collection
func RegisterStatusObject ¶
func RegisterStatusObject(name string, obj StatusObject) error
RegisterStatusObject registers a subsystem and associated a status object on which DebugStatus() is called to collect debug status
Types ¶
type StatusFunc ¶
type StatusFunc func() string
StatusFunc is a function returning the debug status of a subsytem. It is passed into RegisterStatusFunc().
type StatusMap ¶
StatusMap is the collection of debug status of all subsystems. The key is the subsystem name. The value is the subsystem debug status.
func CollectSubsystemStatus ¶
func CollectSubsystemStatus() StatusMap
CollectSubsystemStatus collects the status of all subsystems and returns it
type StatusObject ¶
type StatusObject interface { // DebugStatus() is the equivalent of StatusFunc. It must return the // debug status as a string. DebugStatus() string }
StatusObject is the interface an object must impelement to be able to be passed into RegisterStatusObject().