instruction

package
v0.0.0-...-58f6e79 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScopedInstructions

func ScopedInstructions(instructions map[Key]Instructions) func()

ScopedInstructions is used to mock out the default instructions for testing, this should not be called anywhere else other than tests

Types

type Default

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

func (*Default) Apply

func (r *Default) Apply(ctx context.Context) error

func (*Default) GetName

func (r *Default) GetName() string

func (*Default) GetSteps

func (r *Default) GetSteps() []step.Step

func (*Default) PostCheck

func (r *Default) PostCheck(_ context.Context) error

func (*Default) PreCheck

func (r *Default) PreCheck(_ context.Context) error

type ISCSI

type ISCSI struct {
	Default
}

type Instructions

type Instructions interface {
	GetName() string
	PreCheck(ctx context.Context) error
	Apply(ctx context.Context) error
	PostCheck(ctx context.Context) error
	GetSteps() []step.Step
}

func GetInstructions

func GetInstructions(nodeInfo *nodeinfo.NodeInfo, protocols []protocol.Protocol) ([]Instructions, error)

type Key

type Key struct {
	Protocol protocol.Protocol
	Distro   nodeinfo.Distro
	PkgMgr   nodeinfo.PkgMgr
}

Jump to

Keyboard shortcuts

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