suggest

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSuggestCommand

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

NewSuggestCommand returns a new suggestion command

Types

type SuggestOptions

type SuggestOptions struct {
	Namespace       string
	Name            string
	ForceRedSkyAPI  bool
	ForceKubernetes bool

	Suggestions      SuggestionSource
	RedSkyAPI        *redskyapi.API
	RedSkyClientSet  *redskykube.Clientset
	ControllerClient client.Client

	cmdutil.IOStreams
}

SuggestOptions is the configuration for suggesting assignments

func NewSuggestOptions

func NewSuggestOptions(ioStreams cmdutil.IOStreams) *SuggestOptions

NewSuggestOptions returns a new suggestion options struct

func (*SuggestOptions) Complete

func (o *SuggestOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete the suggestion options

func (*SuggestOptions) Run

func (o *SuggestOptions) Run() error

Run the suggestion options

type SuggestionSource

type SuggestionSource interface {
	AssignInt(name string, min, max int64, def *int64) (int64, error)
	AssignDouble(name string, min, max float64, def *float64) (float64, error)
}

SuggestionSource provides suggested parameter assignments

type SuggestionSourceFlags

type SuggestionSourceFlags struct {
	Assignments      map[string]string
	AllowInteractive bool
	DefaultBehavior  string

	util.IOStreams
}

func NewSuggestionSourceFlags

func NewSuggestionSourceFlags(ioStreams util.IOStreams) *SuggestionSourceFlags

func (*SuggestionSourceFlags) AddFlags

func (f *SuggestionSourceFlags) AddFlags(cmd *cobra.Command)

func (*SuggestionSourceFlags) AssignDouble

func (f *SuggestionSourceFlags) AssignDouble(name string, min, max float64, def *float64) (float64, error)

func (*SuggestionSourceFlags) AssignInt

func (f *SuggestionSourceFlags) AssignInt(name string, min, max int64, def *int64) (int64, error)

Jump to

Keyboard shortcuts

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