plugins

package
v0.0.0-...-bc95524 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStep

type BaseStep[Opts any] struct {
	// Options to pass via yaml to this step.
	conf.JsonOpts[Opts]
	// Database connection.
	DB db.DB
}

Common base for all steps that provides some functionality that would otherwise be duplicated across all steps.

func (*BaseStep[Opts]) Init

func (s *BaseStep[Opts]) Init(db db.DB, opts conf.RawOpts) error

Init the step with the database and options.

type DemoStep

type DemoStep struct {
	// BaseStep is a helper struct that provides common functionality for all steps.
	BaseStep[DemoStepOpts]
}

func (*DemoStep) GetName

func (s *DemoStep) GetName() string

Get the name of this step, used for identification in config, logs, metrics, etc.

func (*DemoStep) Run

func (s *DemoStep) Run() ([]string, error)

type DemoStepOpts

type DemoStepOpts struct {
	// A name of a virtual machine to de-schedule.
	VMName string `json:"vmName"`
}

Jump to

Keyboard shortcuts

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