cli

package
v0.0.0-...-743f219 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// define Koble root command
	RootCmd = &cobra.Command{
		Use:   "koble",
		Short: "Koble is a network emulation tool",
		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
			var err error
			NK, err = koble.Load()
			if err != nil {
				return err
			}
			return nil
		},
		PersistentPostRunE: func(cmd *cobra.Command, args []string) error {
			return NK.Cleanup()
		},
		Version:       koble.VERSION,
		SilenceUsage:  true,
		SilenceErrors: true,
	}
)

Functions

func AddTermFlags

func AddTermFlags(cmd *cobra.Command, launchOpt string)

func AddWaitFlag

func AddWaitFlag(cmd *cobra.Command)

func AutocompMachine

func AutocompMachine(cmd *cobra.Command, args []string,
	toComplete string) ([]string, cobra.ShellCompDirective)

Autocompletion function to get list of machines

func AutocompNamespace

func AutocompNamespace(cmd *cobra.Command, args []string,
	toComplete string) ([]string, cobra.ShellCompDirective)

Autocompletion function to get list of active namespaces

func AutocompNonRunningMachine

func AutocompNonRunningMachine(cmd *cobra.Command, args []string,
	toComplete string) ([]string, cobra.ShellCompDirective)

Autocompletion function to get list of non-running machines

func AutocompRunningMachine

func AutocompRunningMachine(cmd *cobra.Command, args []string,
	toComplete string) ([]string, cobra.ShellCompDirective)

Autocompletion function to get list of running machines

Types

This section is empty.

Jump to

Keyboard shortcuts

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