package version
import "k8s.io/kubernetes/pkg/kubectl/cmd/version"
Index ¶
- func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- type Options
- func NewOptions(ioStreams genericclioptions.IOStreams) *Options
- func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command) error
- func (o *Options) Run() error
- func (o *Options) Validate() error
- type Version
Functions ¶
func NewCmdVersion ¶
NewCmdVersion returns a cobra command for fetching versions
Types ¶
type Options ¶
type Options struct { ClientOnly bool Short bool Output string genericclioptions.IOStreams // contains filtered or unexported fields }
Options is a struct to support version command
func NewOptions ¶
func NewOptions(ioStreams genericclioptions.IOStreams) *Options
NewOptions returns initialized Options
func (*Options) Complete ¶
Complete completes all the required options
func (*Options) Run ¶
Run executes version command
func (*Options) Validate ¶
Validate validates the provided options
type Version ¶
type Version struct { ClientVersion *apimachineryversion.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"` ServerVersion *apimachineryversion.Info `json:"serverVersion,omitempty" yaml:"serverVersion,omitempty"` }
Version is a struct for version information
Source Files ¶
version.go
- Version
- v1.15.1-beta.0
- Published
- Jun 19, 2019
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 4 minutes ago –
Tools for package owners.