cmds

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatJson  = "json"
	FormatYaml  = "yaml"
	FormatTable = "table"
)

Variables

View Source
var (
	OsArch    = ""
	BuildTime = ""
	Branch    = ""
)

--ldflags -X

Functions

func CmdAlias added in v2.2.7

func CmdAlias(f cmdutil.Factory) *cobra.Command

CmdAlias * Name: test Needs: test1 Flags:

  • connect
  • --kubeconfig ~/.kube/config
  • --namespace test
  • --lite

---

Name: test1 Flags:

  • connect
  • --kubeconfig ~/.kube/jumper_config
  • --namespace test
  • --extra-hosts xxx.com

func CmdClone

func CmdClone(f cmdutil.Factory) *cobra.Command

CmdClone multiple cluster operate, can start up one deployment to another cluster kubectl exec POD_NAME -c CONTAINER_NAME /sbin/killall5 or ephemeralcontainers

func CmdConfig

func CmdConfig(f cmdutil.Factory) *cobra.Command

func CmdConnect

func CmdConnect(f cmdutil.Factory) *cobra.Command

func CmdControlPlane

func CmdControlPlane(_ cmdutil.Factory) *cobra.Command

func CmdCp

func CmdCp(f cmdutil.Factory) *cobra.Command

func CmdDaemon

func CmdDaemon(_ cmdutil.Factory) *cobra.Command

func CmdDev

func CmdDev(f cmdutil.Factory) *cobra.Command

func CmdDisconnect

func CmdDisconnect(f cmdutil.Factory) *cobra.Command

func CmdGet

func CmdGet(f cmdutil.Factory) *cobra.Command

func CmdLeave

func CmdLeave(f cmdutil.Factory) *cobra.Command

func CmdList

func CmdList(f cmdutil.Factory) *cobra.Command

func CmdLogs

func CmdLogs(f cmdutil.Factory) *cobra.Command

func CmdOptions

func CmdOptions(cmdutil.Factory) *cobra.Command

func CmdProxy

func CmdProxy(f cmdutil.Factory) *cobra.Command

func CmdQuit

func CmdQuit(f cmdutil.Factory) *cobra.Command

func CmdRemove

func CmdRemove(f cmdutil.Factory) *cobra.Command

func CmdReset

func CmdReset(f cmdutil.Factory) *cobra.Command

func CmdSSH

func CmdSSH(_ cmdutil.Factory) *cobra.Command

CmdSSH 设置本地的IP是223.254.0.1/32 ,记得一定是掩码 32位, 这样别的路由不会走到这里来

func CmdSSHDaemon

func CmdSSHDaemon(_ cmdutil.Factory) *cobra.Command

CmdSSHDaemon set local tun ip 223.254.0.1/32, remember to use mask 32

func CmdServe

func CmdServe(_ cmdutil.Factory) *cobra.Command

func CmdStatus

func CmdStatus(f cmdutil.Factory) *cobra.Command

func CmdUpgrade

func CmdUpgrade(_ cmdutil.Factory) *cobra.Command

func CmdVersion

func CmdVersion(cmdutil.Factory) *cobra.Command

func CmdWebhook

func CmdWebhook(f cmdutil.Factory) *cobra.Command

func GetClusterIDByConfig added in v2.2.7

func GetClusterIDByConfig(cmd *cobra.Command, config Config) (string, error)

func NewKubeVPNCommand

func NewKubeVPNCommand() *cobra.Command

Types

type Config added in v2.2.7

type Config struct {
	Name  string   `yaml:"Name"`
	Needs string   `yaml:"Needs,omitempty"`
	Flags []string `yaml:"Flags,omitempty"`
}

func GetConfigs added in v2.2.7

func GetConfigs(configs []Config, name string) ([]Config, error)

func ParseAndGet added in v2.2.7

func ParseAndGet(localFile, remoteAddr string, aliasName string) ([]Config, error)

func ParseConfig added in v2.2.7

func ParseConfig(file []byte) ([]Config, error)

Jump to

Keyboard shortcuts

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