Documentation ¶
Index ¶
- type Checker
- type Health
- func (h *Health) AddInfo(key string, value any) *Health
- func (h *Health) Down() *Health
- func (h Health) GetInfo(key string) any
- func (h Health) GetStatus() Status
- func (h Health) IsDown() bool
- func (h Health) IsOutOfService() bool
- func (h Health) IsUnknown() bool
- func (h Health) IsUp() bool
- func (h Health) MarshalJSON() ([]byte, error)
- func (h *Health) OutOfService() *Health
- func (h *Health) Unknown() *Health
- func (h *Health) UnmarshalJSON(data []byte) error
- func (h *Health) Up() *Health
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
Health 健康状态
func (Health) IsOutOfService ¶
IsOutOfService 判断是否为 IsOutOfService 状态
func (Health) MarshalJSON ¶
MarshalJSON 实现 json.Marshaler 接口的 MarshalJSON 方法
func (*Health) OutOfService ¶
OutOfService 设置健康状态为 OutOfService
func (*Health) UnmarshalJSON ¶
UnmarshalJSON 实现 json.Unmarshaler 接口的 UnmarshalJSON 方法
type Status ¶
type Status int32
Status 健康状态
func StatusString ¶
StatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Status) IsAStatus ¶
IsAStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (Status) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Status
func (*Status) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Status
Click to show internal directories.
Click to hide internal directories.