Documentation
¶
Index ¶
- Variables
- func NewCommand(o *Options) *cobra.Command
- func NewConfigCommand(o *ConfigOptions) *cobra.Command
- func NewControllerCommand(o *ControllerOptions) *cobra.Command
- func NewExperimentCommand(o *ExperimentOptions) *cobra.Command
- func NewVersionCommand(o *VersionOptions) *cobra.Command
- type APIError
- type AllTheLint
- type Asset
- type ConfigOptions
- type ControllerOptions
- type ExperimentOptions
- type Lint
- type LintError
- type Linter
- type Options
- type Release
- type ReleaseList
- type VersionOptions
Constants ¶
This section is empty.
Variables ¶
var GitHubReleasesURL = "https://api.github.com/repos/thestormforge/optimize-controller/releases"
Functions ¶
func NewCommand ¶
NewCommand creates a new command for checking components
func NewConfigCommand ¶
func NewConfigCommand(o *ConfigOptions) *cobra.Command
NewConfigCommand creates a new command for checking the Red Sky Configuration
func NewControllerCommand ¶
func NewControllerCommand(o *ControllerOptions) *cobra.Command
NewControllerCommand creates a new command for checking a Red Sky controller
func NewExperimentCommand ¶
func NewExperimentCommand(o *ExperimentOptions) *cobra.Command
NewExperimentCommand creates a new command for checking an experiment manifest
func NewVersionCommand ¶
func NewVersionCommand(o *VersionOptions) *cobra.Command
NewVersionCommand creates a new command for checking the current version of the product
Types ¶
type APIError ¶
type AllTheLint ¶
type AllTheLint struct {
Problems []LintError
}
AllTheLint is an entry point for collecting LintError instances.
func (*AllTheLint) For ¶
func (l *AllTheLint) For(elem ...interface{}) Linter
For returns a new linter at the specified path
type ConfigOptions ¶
type ConfigOptions struct { // Config is the Red Sky Configuration to check Config *config.RedSkyConfig // ExperimentsAPI is used to interact with the Red Sky Experiments API ExperimentsAPI experimentsv1alpha1.API // IOStreams are used to access the standard process streams commander.IOStreams }
ConfigOptions are the options for checking a Red Sky Configuration
type ControllerOptions ¶
type ControllerOptions struct { // Config is the Red Sky Configuration for connecting to the cluster Config *config.RedSkyConfig // IOStreams are used to access the standard process streams commander.IOStreams // Wait for the controller to be ready Wait bool }
ControllerOptions are the options for checking a Red Sky controller
type ExperimentOptions ¶
type ExperimentOptions struct { // IOStreams are used to access the standard process streams commander.IOStreams Filename string }
ExperimentOptions are the options for checking an experiment manifest
type Lint ¶
type Lint interface { // WithDescription returns this lint including the specified description WithDescription(description string) Lint // Missing indicates that something should have been specified but wasn't Missing(thing string) // Invalid indicates that something was not properly set from a closed set of possible valid values Invalid(thing string, was interface{}, allowed ...interface{}) // Failed indicates that processing something produced an error Failed(thing string, err error) }
Lint is the general types of problems we can have
type LintError ¶
type LintError struct { // Path is the dotted notation path leading to where the lint was encountered Path string // Severity indicates how bad this is: 0 = error (you will have problems), 1 = warning (you might have problems), 2+ = nitpicking (you won't have problems) Severity int // Message is a brief indicator of what went wrong Message string // Description is a more detailed explanation, possibly including remediation Description string }
LintError is an indication that something is wrong
type Linter ¶
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 Options ¶
type Options struct { // Config is the Red Sky Configuration Config *config.RedSkyConfig }
Options includes the configuration for the subcommands
type Release ¶
type Release struct { Name string `json:"name"` TagName string `json:"tag_name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` Assets []Asset `json:"assets"` }
func (*Release) AssetByName ¶
type ReleaseList ¶
type ReleaseList []Release
func (ReleaseList) Latest ¶
func (rl ReleaseList) Latest() *Release
type VersionOptions ¶
type VersionOptions struct { // IOStreams are used to access the standard process streams commander.IOStreams }
VersionOptions are the options for checking the current version of the product