util

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackgroundRun

func BackgroundRun(cmd *exec.Cmd, name string, debug bool) (err error)

BackgroundRun run cmd in background

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string)

CreateDirIfNotExist create dir

func GetCirds

func GetCirds(clientset *kubernetes.Clientset, podCIDR string) (cidrs []string, err error)

GetCirds Get kubernetes cluster resource crids

func GetOutboundIP

func GetOutboundIP() (address string)

GetOutboundIP Get preferred outbound ip of this machine

func GetRandomSSHPort

func GetRandomSSHPort(podIP string) string

GetRandomSSHPort get pod random ssh port

func HomeDir

func HomeDir() string

HomeDir Current User home dir

func IsDaemonRunning

func IsDaemonRunning(pidFile string) bool

IsDaemonRunning check daemon is running or not

func PortForward

func PortForward(kubeConifg string, namespace string, resource string, remotePort int) *exec.Cmd

PortForward kubectl port forward

func RandomString

func RandomString(n int) string

RandomString Generate RandomString

func SSHRemotePortForward

func SSHRemotePortForward(localPort string, remoteHost string, remotePort string, remoteSSHPort int) *exec.Cmd

SSHRemotePortForward ssh remote port forward

func SSHUttle

func SSHUttle(remoteHost string, remotePort int, DNSServer string, disableDNS bool, cidrs []string) *exec.Cmd

SSHUttle ssh-baed vpn connect

Types

This section is empty.

Jump to

Keyboard shortcuts

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