power

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWolBridge = "zos"
	PowerServerPort  = 8039
)

Variables

This section is empty.

Functions

func EnsureWakeOnLan

func EnsureWakeOnLan(ctx context.Context) (bool, error)

Types

type PowerServer

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

func NewPowerServer

func NewPowerServer(
	registrarGateway *stubs.RegistrarGatewayStub,
	consumer *events.RedisConsumer,
	enabled bool,
	farm pkg.FarmID,
	node uint32,
	twin uint32,
	ut *Uptime,
) (*PowerServer, error)

func (*PowerServer) Start

func (p *PowerServer) Start(ctx context.Context) error

type Uptime

type Uptime struct {
	// Mark is set to done after the first uptime is sent
	Mark utils.Mark
	// contains filtered or unexported fields
}

func NewUptime

func NewUptime(registrarGateway *stubs.RegistrarGatewayStub) (*Uptime, error)

func (*Uptime) SendNow

func (u *Uptime) SendNow() error

func (*Uptime) Start

func (u *Uptime) Start(ctx context.Context)

start uptime reporting. returns a channel that is closed immediately after the first uptime is reported.

Jump to

Keyboard shortcuts

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