runbook

package
v0.490.0 Latest Latest
Warning

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

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

README

runbook

An approach to standardize automated processes by defining them step by step including the corresponding documentation as runbook.

Examples

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunBook

type RunBook struct {
	Name        string
	Description string
	Steps       []Runnable
}

Defines a runbook

func (*RunBook) DocumentSteps

func (r *RunBook) DocumentSteps() (string, error)

func (*RunBook) Execute

func (r *RunBook) Execute(ctx context.Context) error

func (*RunBook) GetDescription

func (r *RunBook) GetDescription() (string, error)

func (*RunBook) GetNSteps

func (r *RunBook) GetNSteps(ctx context.Context) int

func (*RunBook) GetName

func (r *RunBook) GetName() (string, error)

func (*RunBook) Validate

func (r *RunBook) Validate(ctx context.Context) error

type Runnable

type Runnable interface {
	GetName() (string, error)
	GetDescription() (string, error)
	Execute(ctx context.Context) error
	Validate(ctx context.Context) error
}

type Step

type Step struct {
	Name        string
	Description string
	Run         func(context.Context) error
}

func (*Step) Execute

func (s *Step) Execute(ctx context.Context) error

func (*Step) GetDescription

func (s *Step) GetDescription() (string, error)

func (*Step) GetName

func (s *Step) GetName() (string, error)

func (*Step) Validate

func (s *Step) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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