heartbeat

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func (*Database) Open

func (d *Database) Open(dbConfig natsservice.MysqlConfig) error

type DatabaseConfig

type DatabaseConfig struct {
	DBHost string `ini:"dbhost,omitempty"`
	DBname string `ini:"dbname,omitempty"`
	DBuser string `ini:"dbuser,omitempty"`
	DBpass string `ini:"dbpass,omitempty"`
	DBPort int    `ini:"dbport,omitempty"`
}

type HeartbeatSaver

type HeartbeatSaver struct {
	natsservice.NatsService
	// contains filtered or unexported fields
}

HeartbeatSaver listens to com.plugis.heartbeat.Sent events and saves events in a database

func NewHeartbeatSaver added in v0.1.15

func NewHeartbeatSaver(mysqlConfig natsservice.MysqlConfig) *HeartbeatSaver

func (*HeartbeatSaver) Logger

func (svc *HeartbeatSaver) Logger() *logrus.Entry

func (*HeartbeatSaver) Run

func (svc *HeartbeatSaver) Run(ctx context.Context, params ...interface{}) error

type HeartbeatSender

type HeartbeatSender struct {
	natsservice.NatsService
	Period       int
	RandomPeriod int
	// contains filtered or unexported fields
}

func NewHeartbeatSender added in v1.1.18

func NewHeartbeatSender(period int, randomPeriod int) *HeartbeatSender

func (*HeartbeatSender) Logger

func (svc *HeartbeatSender) Logger() *logrus.Entry

func (*HeartbeatSender) Run

func (svc *HeartbeatSender) Run(ctx context.Context, params ...interface{}) error

func (*HeartbeatSender) SendHeartbeatEvent

func (svc *HeartbeatSender) SendHeartbeatEvent(ctx context.Context) error

type HeartbeatWebInterface added in v0.1.14

type HeartbeatWebInterface struct {
	natsservice.NatsService
	// contains filtered or unexported fields
}

HeartbeatWebInterface exposes com.plugis.heartbeat.Sent events that are saved in the database

func NewHeartbeatWebInterface added in v0.1.15

func NewHeartbeatWebInterface(mysqlConfig natsservice.MysqlConfig) *HeartbeatWebInterface

func (*HeartbeatWebInterface) Run added in v0.1.14

func (svc *HeartbeatWebInterface) Run(ctx context.Context, params ...interface{}) error

type Sent

type Sent struct {
	Hostname        string    `json:"hostname"`
	Mac             string    `json:"mac"`
	InternalIP      string    `json:"ip"`
	Started         time.Time `json:"started,omitempty"`
	Uptime          uint64    `json:"uptime,omitempty"`
	NatsServiceName string    `json:"nats-service,omitempty"`
}

ce type : com.plugis.heartbeat.Sent

func NewSent

func NewSent(natsServiceName string) (*Sent, error)

NewSent creates a new sent event

Jump to

Keyboard shortcuts

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