Documentation ¶
Index ¶
- Constants
- type HealthEndpoint
- func (he *HealthEndpoint) AddRoutine(routine, id string) (err error)
- func (he *HealthEndpoint) CountRoutine(routine string) int
- func (he *HealthEndpoint) CurrentHealth() (s, m string)
- func (he *HealthEndpoint) DelRoutine(routine, id string) (err error)
- func (he *HealthEndpoint) GetJSON() map[string]interface{}
- func (he *HealthEndpoint) GetTXT() string
- func (he *HealthEndpoint) Handle(w http.ResponseWriter, req *http.Request)
- func (he *HealthEndpoint) SetHealth(status, msg string) (err error)
- func (he *HealthEndpoint) UpsertVitals(name, state string, t time.Time)
- type Plugin
- type Routines
- type Vitals
Constants ¶
View Source
const ( Healthy = "healthy" Unhealthy = "unhealthy" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthEndpoint ¶ added in v0.1.1
type HealthEndpoint struct {
// contains filtered or unexported fields
}
func NewHealthEndpoint ¶ added in v0.1.1
func NewHealthEndpoint(routines []string) *HealthEndpoint
func (*HealthEndpoint) AddRoutine ¶ added in v0.1.1
func (he *HealthEndpoint) AddRoutine(routine, id string) (err error)
func (*HealthEndpoint) CountRoutine ¶ added in v0.1.1
func (he *HealthEndpoint) CountRoutine(routine string) int
func (*HealthEndpoint) CurrentHealth ¶ added in v0.1.2
func (he *HealthEndpoint) CurrentHealth() (s, m string)
func (*HealthEndpoint) DelRoutine ¶ added in v0.1.1
func (he *HealthEndpoint) DelRoutine(routine, id string) (err error)
func (*HealthEndpoint) GetJSON ¶ added in v0.1.1
func (he *HealthEndpoint) GetJSON() map[string]interface{}
func (*HealthEndpoint) GetTXT ¶ added in v0.1.1
func (he *HealthEndpoint) GetTXT() string
func (*HealthEndpoint) Handle ¶ added in v0.1.1
func (he *HealthEndpoint) Handle(w http.ResponseWriter, req *http.Request)
func (*HealthEndpoint) SetHealth ¶ added in v0.1.2
func (he *HealthEndpoint) SetHealth(status, msg string) (err error)
func (*HealthEndpoint) UpsertVitals ¶ added in v0.1.2
func (he *HealthEndpoint) UpsertVitals(name, state string, t time.Time)
/ Vitals
type Plugin ¶
type Plugin struct { qtypes.Plugin HealthEndpoint *HealthEndpoint // contains filtered or unexported fields }
func (*Plugin) LogMiddleware ¶ added in v0.1.1
func (p *Plugin) LogMiddleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*Plugin) RoutineAdd ¶ added in v0.1.1
func (*Plugin) RoutineDel ¶ added in v0.1.1
type Routines ¶
type Routines struct {
// contains filtered or unexported fields
}
func NewRoutines ¶
func NewRoutines() *Routines
Click to show internal directories.
Click to hide internal directories.