status

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentStatus

type ComponentStatus struct {
	Status  StatusType `json:"status"`
	Message string     `json:"message"`
	// contains filtered or unexported fields
}

func (*ComponentStatus) SetStatus

func (cs *ComponentStatus) SetStatus(statusType StatusType, message string)

type Report

type Report struct {
	Version    string                     `json:"version"`
	Status     StatusType                 `json:"status"`
	Components map[string]ComponentStatus `json:"components"`
}

type Status

type Status struct {
	// contains filtered or unexported fields
}

func NewStatus

func NewStatus(version string) (status *Status)

func (*Status) Register

func (s *Status) Register(name string) (cs *ComponentStatus, err error)

func (*Status) Report

func (s *Status) Report() (report Report)

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

Jump to

Keyboard shortcuts

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