wake

package
v0.0.0-...-ff2b7a2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyRunning = errors.New("already running")

Functions

func IPs

func IPs() map[string]string

func MACs

func MACs() map[string]string

func PollHTTPHealthz

func PollHTTPHealthz(ctx context.Context, addr string) error

func PollSSH

func PollSSH(ctx context.Context, addr string) error

func PollSSH1

func PollSSH1(ctx context.Context, addr string) error

func PushMainboardPower

func PushMainboardPower(mqttBroker, clientID string) error

Types

type Config

type Config struct {
	MQTTBroker string
	ClientID   string

	Host string
	IP   string
	MAC  string
}

func (*Config) Wakeup

func (c *Config) Wakeup(ctx context.Context) error

Wakeup wakes up the specified host unless it is already running. A host is considered up when it accepts SSH connections (tcp/22).

For hosts storage*, HTTP on port 8200 needs to return HTTP 200, too, signaling that the /srv mountpoint was successfully mounted.

Jump to

Keyboard shortcuts

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