check

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomMetric

func GetRandomMetric() string

func GetRandomName

func GetRandomName(retry int) string

GetRandomName returns a randomly generated name, if the number of retries is greater then 0 a small random number is also produced

func GetRandomParameter

func GetRandomParameter() string

func NewCheckCommand

func NewCheckCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command

func NewCheckExperimentCommand added in v1.2.0

func NewCheckExperimentCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command

func NewServerCheckCommand

func NewServerCheckCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command

Types

type CheckExperimentOptions added in v1.2.0

type CheckExperimentOptions struct {
	Filename string

	cmdutil.IOStreams
}

func NewCheckExperimentOptions added in v1.2.0

func NewCheckExperimentOptions(ioStreams cmdutil.IOStreams) *CheckExperimentOptions

func (*CheckExperimentOptions) Complete added in v1.2.0

func (*CheckExperimentOptions) Run added in v1.2.0

func (o *CheckExperimentOptions) Run() error

type CheckServerOptions added in v1.2.0

type CheckServerOptions struct {
	Name           string
	ParameterCount int
	MetricCount    int
	AllowInvalid   bool
	ReportFailure  bool
	DryRun         bool

	RedSkyAPI redskyapi.API

	cmdutil.IOStreams
}

func NewCheckServerOptions added in v1.2.0

func NewCheckServerOptions(ioStreams cmdutil.IOStreams) *CheckServerOptions

func (*CheckServerOptions) Complete added in v1.2.0

func (o *CheckServerOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error

func (*CheckServerOptions) Run added in v1.2.0

func (o *CheckServerOptions) Run() error

func (*CheckServerOptions) Validate added in v1.2.0

func (o *CheckServerOptions) Validate() error

type Lint added in v1.2.0

type Lint interface {
	WithDescription(description string) Lint
	Empty(thing string)
	Missing(thing string)
	Invalid(thing string, was interface{}, allowed ...interface{})
	Failed(thing string, err error)
}

Lint is the general types of problems we can have

type LintError added in v1.2.0

type LintError struct {
	Path        string
	Severity    int // 0 = error, 1 = warning, 2+ nitpicking...
	Message     string
	Description string
}

LintError is an indication that something is wrong

func CheckExperiment added in v1.2.0

func CheckExperiment(experiment *redskyv1alpha1.Experiment) []LintError

func (*LintError) Error added in v1.2.0

func (e *LintError) Error() string

type Linter added in v1.2.0

type Linter interface {
	// For returns a new linter at the specified path
	For(elem ...interface{}) Linter
	// Severity determines how serious the lint is
	Severity(s int) Lint

	// Error is sugar for `Severity(0)`
	Error() Lint
	// Warning is sugar for `Severity(1)`
	Warning() Lint
}

Linter is a collector of lint errors

type RootLinter added in v1.2.0

type RootLinter struct {
	Problems []LintError
}

func NewLinter added in v1.2.0

func NewLinter() *RootLinter

func (*RootLinter) For added in v1.2.0

func (l *RootLinter) For(elem ...interface{}) Linter

Jump to

Keyboard shortcuts

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