Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyExists = errors.New("component already exists")
)
Functions ¶
This section is empty.
Types ¶
type ComponentReport ¶ added in v0.0.27
type ComponentReport struct { Status StatusType `json:"status"` Message string `json:"message,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
type ComponentStatus ¶
type ComponentStatus struct {
// contains filtered or unexported fields
}
func (*ComponentStatus) LastUpdate ¶ added in v0.0.13
func (cs *ComponentStatus) LastUpdate() time.Time
func (*ComponentStatus) Message ¶
func (cs *ComponentStatus) Message() string
func (*ComponentStatus) SetStatus ¶
func (cs *ComponentStatus) SetStatus(statusType StatusType, message string)
func (*ComponentStatus) Status ¶
func (cs *ComponentStatus) Status() StatusType
type Report ¶
type Report struct { Version string `json:"version"` Hostname string `json:"hostname"` Status StatusType `json:"status"` Components map[string]ComponentReport `json:"components"` }
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) RegisterOrGet ¶ added in v0.2.0
func (s *Status) RegisterOrGet(name string) (cs *ComponentStatus, err error)
type StatusType ¶
type StatusType int
const ( ERROR StatusType = iota WARN OK )
func (StatusType) MarshalJSON ¶
func (s StatusType) MarshalJSON() ([]byte, error)
func (StatusType) String ¶
func (s StatusType) String() string
func (*StatusType) UnmarshalJSON ¶
func (s *StatusType) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.