health

package
Version: v0.0.0-...-5385bce Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Healthy represents a healthy response
	Healthy = "healthy"
)

Variables

This section is empty.

Functions

func GetDeviceAPIHealth

func GetDeviceAPIHealth(ctx context.Context) (map[string]string, *nerr.E)

GetDeviceAPIHealth .

Types

type ServiceCheckConfig

type ServiceCheckConfig struct {
	Name   string      `json:"name"`
	URL    string      `json:"url"`
	Method string      `json:"method"`
	Body   interface{} `json:"body,omitempty"`
}

ServiceCheckConfig .

type ServiceCheckResponse

type ServiceCheckResponse struct {
	ServiceCheckConfig `json:"request"`

	StatusCode int         `json:"status-code,omitempty"`
	Error      string      `json:"error,omitempty"`
	Body       interface{} `json:"response-body,omitempty"`
}

ServiceCheckResponse .

func CheckServices

func CheckServices(ctx context.Context, checks []ServiceCheckConfig) []ServiceCheckResponse

CheckServices .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL