heartbeat

package
v0.0.0-...-d31e6af Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreqCheck

func FreqCheck(t time.Time, freq float64) bool

Types

type HTTPHeartbeat

type HTTPHeartbeat struct {
	ID      string
	Service HTTPService
	Logger  *logrus.Logger
	Mongo   *data.MongoClient
}

func (*HTTPHeartbeat) CheckHeartbeat

func (h *HTTPHeartbeat) CheckHeartbeat()

CheckHeartbeat - Http

func (*HTTPHeartbeat) Run

func (h *HTTPHeartbeat) Run()

Run - Http

type HTTPService

type HTTPService struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"`
	Host           string             `bson:"host,omitempty" json:"host"`
	Name           string             `bson:"name,omitempty" json:"name"`
	Stype          string             `bson:"stype,omitempty" json:"stype"`
	AcceptedStatus map[int]bool       `bson:"accepted_status,omitempty" json:"accepted_status"`
	Frequency      float64            `bson:"frequency,omitempty" json:"frequency"`
	RequestMethod  string             `bson:"request_method,omitempty" json:"request_method"`
	RequestPayload string             `bson:"request_payload,omitempty" json:"request_payload"`
	RequestHeaders [][2]string        `bson:"request_headers,omitempty" json:"request_headers"`
	Lastupdate     time.Time          `bson:"last_update,omitempty"`
}

Jump to

Keyboard shortcuts

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