heartbeat

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeater

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

Heartbeater sends pings to the platform.

func NewHeartbeater

func NewHeartbeater(p Pinger) *Heartbeater

NewHeartbeater creates a new heartbeater using the given Pinger.

func (*Heartbeater) Run

func (m *Heartbeater) Run(ctx context.Context)

Run runs the Heartbeater. This is a blocking method.

type Pinger

type Pinger interface {
	Ping(ctx context.Context) error
}

Pinger can ping the platform.

Jump to

Keyboard shortcuts

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