hyperkube

package
v3.9.0-alpha.3+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

README

This package contains files copied from the main kubernetes/kubernetes repo. The files are taken from cmd/hyperkube.

Version: 1.8

The following additional changes have been made to the files.

  • The package name from k8s.io/kubernetes/cmd/hyperkube has been changed from
    main to hyperkube.
  • The use of stretchr/testify in k8s.io/kubernetes/cmd/hyperkube/hyperkube_test.go
    has been replaced with similar assert calls to functions in service-catalog/test/util/assertions.go.
  • In k8s.io/kubernetes/cmd/hyperkube/hyperkube.go, the code to print the
    version has been replaced with version code from service-catalog.
  • In k8s.io/kubernetes/cmd/hyperkube/server.go, made exportable the name field
    of the Server type, renaming the field to ServerName to avoid conflict with
    the Name function.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HyperKube

type HyperKube struct {
	Name string // The executable name, used for help and soft-link invocation
	Long string // A long description of the binary.  It will be word-wrapped before output.
	// contains filtered or unexported fields
}

HyperKube represents a single binary that can morph/manage into multiple servers.

func (*HyperKube) AddServer

func (hk *HyperKube) AddServer(s *Server)

AddServer adds a server to the HyperKube object.

func (*HyperKube) FindServer

func (hk *HyperKube) FindServer(name string) (*Server, error)

FindServer will find a specific server named name.

func (*HyperKube) Flags

func (hk *HyperKube) Flags() *pflag.FlagSet

Flags returns a flagset for "global" flags.

func (hk *HyperKube) MakeSymlinks(command string) error

MakeSymlinks will create a symlink for each registered hyperkube server in the local directory.

func (*HyperKube) Out

func (hk *HyperKube) Out() io.Writer

Out returns the io.Writer that is used for all usage/error information

func (*HyperKube) Print

func (hk *HyperKube) Print(i ...interface{})

Print is a convenience method to Print to the defined output

func (*HyperKube) Printf

func (hk *HyperKube) Printf(format string, i ...interface{})

Printf is a convenience method to Printf to the defined output

func (*HyperKube) Println

func (hk *HyperKube) Println(i ...interface{})

Println is a convenience method to Println to the defined output

func (*HyperKube) Run

func (hk *HyperKube) Run(args []string, stopCh <-chan struct{}) error

Run the server. This will pick the appropriate server and run it.

func (*HyperKube) RunToExit

func (hk *HyperKube) RunToExit(args []string)

RunToExit will run the hyperkube and then call os.Exit with an appropriate exit code.

func (*HyperKube) Servers

func (hk *HyperKube) Servers() []Server

Servers returns a list of all of the registered servers

func (*HyperKube) SetOut

func (hk *HyperKube) SetOut(w io.Writer)

SetOut sets the output writer for all usage/error information

func (*HyperKube) Usage

func (hk *HyperKube) Usage()

Usage will write out a summary for all servers that this binary supports.

type Server

type Server struct {
	SimpleUsage     string        // One line description of the server.
	Long            string        // Longer free form description of the server
	Run             serverRunFunc // Run the server.  This is not expected to return.
	PrimaryName     string
	AlternativeName string
	RespectsStopCh  bool
	// contains filtered or unexported fields
}

Server describes a server that this binary can morph into.

func (*Server) Flags

func (s *Server) Flags() *pflag.FlagSet

Flags returns a flagset for this server

func (*Server) Name

func (s *Server) Name() string

Name returns the name of the command as derived from the usage line.

func (*Server) Usage

func (s *Server) Usage() error

Usage returns the full usage string including all of the flags.

Jump to

Keyboard shortcuts

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