healthcheck

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeCount

func CodeCount(n, key string, times int) bool

CodeCount : success && failed counter

func DeleteHealthCheck

func DeleteHealthCheck(jsonObj interface{}, timeNow time.Time) (a *MyERR.MyError)

DeleteHealthCheck : method for delete health check

func DownHC

func DownHC(upstreamName, protocal, path string, times, timeout int)

DownHC : down status ip&port check

func DownOneStart

func DownOneStart(ctx context.Context, upstreamName, protocal, path string, sInterval, sTimes, sTimeout, fInterval, fTimes, fTimeout int)

DownOneStart : down status health check driver

func GetHealthCheck

func GetHealthCheck(jsonObj interface{}, timeNow time.Time) (*MyERR.MyError, string)

GetHealthCheck : method for get health check

func HC

func HC()

HC : new health check

func HTTP

func HTTP(request string, t int) (code int, err error)

HTTP : health check http protocol

func InitHealthCheck

func InitHealthCheck(timeNow time.Time) *MyERR.MyError

InitHealthCheck : goroutines for Init Health Check

func PatchHealthCheck

func PatchHealthCheck(jsonObj interface{}, timeNow time.Time) (a *MyERR.MyError)

PatchHealthCheck : method for patch health check

func PutHealthCheck

func PutHealthCheck(jsonObj interface{}, timeNow time.Time) *MyERR.MyError

PutHealthCheck : method for put health check

func TCP

func TCP(ip string, pingTimeout int) bool

TCP : health check tcp protocol

func TempToNuts

func TempToNuts(v []byte, h *healthCheck)

TempToNuts : set health check template to nutsDB

func UpDownToNuts

func UpDownToNuts(u *upstream)

UpDownToNuts : get up&down upstream form nutsDB

func UpHC

func UpHC(upstreamName, protocal, path string, times, timeout int)

UpHC : up status ip&port check

func UpOneStart

func UpOneStart(ctx context.Context, upstreamName, protocal, path string, sInterval, sTimes, sTimeout, fInterval, fTimes, fTimeout int)

UpOneStart : up status health check driver

Types

This section is empty.

Jump to

Keyboard shortcuts

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