agent

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package agent implements the metal agent service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service controls servers by establishing a reverse GRPC tunnel with them and by sending them commands.

func NewService

func NewService(grpcServer grpc.ServiceRegistrar, state state.State, wipeWithZeroes bool, logger *zap.Logger) *Service

NewService creates a new agent service.

func (*Service) AllConnectedMachines

func (c *Service) AllConnectedMachines() map[string]struct{}

AllConnectedMachines returns a set of all connected machines.

func (*Service) GetPowerManagement

func (c *Service) GetPowerManagement(ctx context.Context, id string) (*agentpb.GetPowerManagementResponse, error)

GetPowerManagement retrieves the IPMI information from the server with the given ID.

func (*Service) IsAccessible

func (c *Service) IsAccessible(ctx context.Context, id string) (bool, error)

IsAccessible checks if the agent with the given ID is accessible.

func (*Service) SetPowerManagement

func (c *Service) SetPowerManagement(ctx context.Context, id string, req *agentpb.SetPowerManagementRequest) error

SetPowerManagement sets the IPMI information on the server with the given ID.

func (*Service) WipeDisks

func (c *Service) WipeDisks(ctx context.Context, id string) error

WipeDisks wipes the disks on the server with the given ID.

Jump to

Keyboard shortcuts

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