local

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Logger *log.Entry
	Name   string
	// contains filtered or unexported fields
}

Check stores all the information needed to run a check locally.

func NewCheck

func NewCheck(name string, checker Checker, logger *log.Entry, conf *config.Config, json bool) *Check

NewCheck creates new check to be run from the command line without having an agent.

func (*Check) RunAndServe

func (c *Check) RunAndServe()

RunAndServe implements the behavior needed by the sdk for a check runner to execute a check.

func (*Check) Shutdown

func (c *Check) Shutdown() error

Shutdown is needed to fullfil the check interface but we don't need to do anything in this case.

type Checker

type Checker interface {
	Run(ctx context.Context, target, assetType, opts string, state astate.State) error
	CleanUp(ctx context.Context, target, assetType, opts string)
}

Checker defines the shape a checker must have in order to be executed as vulcan-check.

type State

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

State holds the state for a local check.

Jump to

Keyboard shortcuts

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