cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cmd (internal) provides functions that are needed to implement the commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateIPRanges

func CalculateIPRanges(podRange, serviceRange string) (pod, service, cluster *net.IPNet,
	bind, firstSVC net.IP, errRet error)

CalculateIPRanges takes the pod and service range as strings and calculates the required networks for Microkube from it

func EnsureDir

func EnsureDir(root, subdirectory string, permissions os.FileMode) error

EnsureDir ensures that root/subdirectory exists, is a directory and has permissions 'permissions'

func FindBindAddress

func FindBindAddress() net.IP

FindBindAddress tries to find a private IPv4 address from some local interface that can be used to bind services to it

Types

type ArgHandler

type ArgHandler struct {
	/* Extracted data */
	// Directory to create all state directories in
	BaseDir string
	// Directory to additionally include in the binary search path
	ExtraBinDir string
	// Network range to use for pods
	PodRangeNet *net.IPNet
	// Network range to use for services
	ServiceRangeNet *net.IPNet
	// Network range that contains both pod and service range
	ClusterIPRange *net.IPNet
	// Whether to deploy the kubernetes dashboard cluster addon
	EnableKubeDash bool
	// Whether to deploy the CoreDNS cluster addon
	EnableDns bool
	// Whether to include verbose log output
	Verbose bool
	// contains filtered or unexported fields
}

ArgHandler provides applications with a unified set of command line parameters

func NewArgHandler

func NewArgHandler(isMainBinary bool) *ArgHandler

NewArgHandler returns a new instance of ArgHandler, registering arguments if necessary

func (*ArgHandler) HandleArgs

func (a *ArgHandler) HandleArgs() *handlers.ExecutionEnvironment

HandleArgs registers, parses and evaluates command line arguments

Jump to

Keyboard shortcuts

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