Documentation
¶
Index ¶
- func GetRandomMetric() string
- func GetRandomName(retry int) string
- func GetRandomParameter() string
- func NewCheckCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCheckExperimentCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewServerCheckCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command
- type CheckExperimentOptions
- type CheckServerOptions
- type Lint
- type LintError
- type Linter
- type RootLinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomMetric ¶
func GetRandomMetric() string
func GetRandomName ¶
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 NewCheckExperimentCommand ¶ added in v1.2.0
Types ¶
type CheckExperimentOptions ¶ added in v1.2.0
func NewCheckExperimentOptions ¶ added in v1.2.0
func NewCheckExperimentOptions(ioStreams cmdutil.IOStreams) *CheckExperimentOptions
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) 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
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
Click to show internal directories.
Click to hide internal directories.