amt

package
v0.0.0-...-fb8c843 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package amt implements just enough WS-Management to query and set the DUT's power state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMTClient

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

AMTClient holds WS-Management connection data.

func NewAMTClient

func NewAMTClient(ctx context.Context, hostname string, username string, password string, useTLS bool) *AMTClient

NewAMTClient returns a new AMTClient instance.

func (AMTClient) GetPowerState

func (c AMTClient) GetPowerState(ctx context.Context) (int, error)

GetPowerState returns the power state as an int.

func (AMTClient) SetPowerState

func (c AMTClient) SetPowerState(ctx context.Context, state string) error

SetPowerState attempts to set the specified power state: possible values are "on" or "off".

Jump to

Keyboard shortcuts

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