Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryReader ¶
func DirectoryReader(dir string)
DirectoryReader loads (and regularly re-loads) health .json files from the specified files into the default health registry.
Types ¶
type HealthReference ¶
type HealthReference struct {
// contains filtered or unexported fields
}
func (*HealthReference) Name ¶
func (hr *HealthReference) Name(record string) string
func (*HealthReference) String ¶
func (hr *HealthReference) String() string
type HealthTester ¶
type HealthTester interface { // Test(record string) bool Name(record string) string String() string }
func NewReferenceFromMap ¶
func NewReferenceFromMap(i map[string]interface{}) (HealthTester, error)
type Service ¶
type Service struct {
Status StatusType
}
func (*Service) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type StatusFile ¶
type StatusFile struct {
// contains filtered or unexported fields
}
func NewStatusFile ¶
func NewStatusFile(filename string) *StatusFile
func (*StatusFile) Close ¶
func (s *StatusFile) Close() error
func (*StatusFile) GetStatus ¶
func (s *StatusFile) GetStatus(check string) StatusType
func (*StatusFile) Load ¶
func (s *StatusFile) Load(filename string) error
Load imports the data atomically into the status map. If there's a JSON error the old data is preserved.
func (*StatusFile) Reload ¶
func (s *StatusFile) Reload() error
type StatusFileData ¶
type StatusType ¶
type StatusType uint8
const ( StatusUnknown StatusType = iota StatusUnhealthy StatusHealthy )
func GetStatus ¶
func GetStatus(name string) StatusType
func (StatusType) String ¶
func (st StatusType) String() string
Click to show internal directories.
Click to hide internal directories.