v1

package
v5.1.8-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatHealthy -
	StatHealthy string = "healthy"
	// StatUnhealthy -
	StatUnhealthy string = "unhealthy"
	// StatDeath -
	StatDeath string = "death"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Name         string `json:"name"`
	Model        string `json:"model"`
	IP           string `json:"ip"`
	Port         int    `json:"port"`
	Address      string `json:"address"`
	TimeInterval int    `json:"time_interval"`
	MaxErrorsNum int    `json:"max_errors_num"`
}

Health ServiceHealth

func (*Health) Equal

func (l *Health) Equal(r *Health) bool

Equal check if the left health(l) is equal to the right health(r)

type HealthStatus

type HealthStatus struct {
	Name           string        `json:"name"`
	Status         string        `json:"status"`
	ErrorNumber    int           `json:"error_number"`
	ErrorDuration  time.Duration `json:"error_duration"`
	StartErrorTime time.Time     `json:"start_error_time"`
	Info           string        `json:"info"`
	LastStatus     string        `json:"last_status"`
	StatusChange   bool          `json:"status_change"`
}

HealthStatus health status

type Service

type Service struct {
	Sid           string  `json:"service_id"`
	Name          string  `json:"name"`
	ServiceHealth *Health `json:"health"`
	Disable       bool    `json:"disable"`
}

Service Service

func (*Service) Equal

func (l *Service) Equal(r *Service) bool

Equal check if the left service(l) is equal to the right service(r)

Jump to

Keyboard shortcuts

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