Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Healthy should be the response when the microservice is working 100% properly Healthy = "healthy" // Sick should be the response when the microservice is partially working or healing Sick = "sick" // Dead should be the response when the microservice is totally dead Dead = "dead" )
Variables ¶
This section is empty.
Functions ¶
func DefaultStatusHandler ¶
DefaultStatusHandler can be used as a default mstatus handler
func GetMicroserviceVersion ¶
GetMicroserviceVersion returns the version number located in "version.txt"
func GetProgramUptime ¶
GetProgramUptime returns how long the program has been running
Types ¶
type ActiveInput ¶
type ActiveInput struct {
ActiveInput string `json:"active_input,omitempty"`
}
ActiveInput is a base struct for active inputs
type Battery ¶
type Battery struct {
Battery int `json:"battery"`
}
Battery is a base evaluator struct.
type Blanked ¶
type Blanked struct {
Blanked bool `json:"blanked"`
}
Blanked is a base evaluator struct.
type Input ¶
type Input struct {
Input string `json:"input,omitempty"`
}
Input is a base evaluator struct.
type Status ¶
type Status struct { Name string `json:"name,omitempty"` Bin string `json:"bin"` StatusCode string `json:"statuscode"` Version string `json:"version"` Uptime string `json:"uptime"` Info map[string]interface{} `json:"info"` }
Status represents the microservice's health status
func NewBaseStatus ¶
func NewBaseStatus() Status
NewBaseStatus initializes a status stuct with the default stuff.
Click to show internal directories.
Click to hide internal directories.