pinger

package
v0.0.0-...-56cb166 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type API

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

API serves pinger-specific API methods.

func NewAPI

func NewAPI(pinger Pinger) *API

NewAPI builds a new facade for the given backend.

func (API) Ping

func (a API) Ping(ctx context.Context)

Ping is used by the client heartbeat monitor and resets.

func (API) Stop

func (a API) Stop(ctx context.Context) error

Stop stops the pinger.

type Pinger

type Pinger interface {
	worker.Worker
	Ping()
}

Pinger describes a resource that can be pinged and stopped.

Jump to

Keyboard shortcuts

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