debug

package
v1.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 8

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

type StatusMap map[string]string

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().

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL