common

package
v0.2.2-beta1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvVarLocalDomains      = "LOCAL_DOMAIN"
	ClientTunIP             = "CLIENT_TUN_IP"
	ServerTunIP             = "SERVER_TUN_IP"
	TunMaskLength           = "TUN_MASK_LEN"
	ControlBy               = "control-by"
	KubernetesTool          = "kt"
	ComponentConnect        = "connect"
	ComponentExchange       = "exchange"
	ComponentMesh           = "mesh"
	ComponentProvide        = "provide"
	ConnectMethodVpn        = "vpn"
	ConnectMethodTun        = "tun"
	ConnectMethodSocks      = "socks"
	ConnectMethodSocks5     = "socks5"
	ExchangeMethodScale     = "scale"
	ExchangeMethodEphemeral = "ephemeral"
	MeshMethodAuto          = "auto"
	MeshMethodManual        = "manual"
	PostfixRsaKey           = "_id_rsa"
	YyyyMmDdHhMmSs          = "2006-01-02 15:04:05"
	SshPort                 = 22
	Socks4Port              = 1080

	// KTVersion label used for fetch shadow mark in UI
	KTVersion = "kt-version"
	// KTComponent label used for distinguish shadow type
	KTComponent = "kt-component"
	// KTRemoteAddress label used for fetch pod IP in UI
	KTRemoteAddress = "kt-remote-address"
	// KTName label used for wait shadow pod ready
	KTName = "kt-name"
	// KTConfig annotation used for clean up context
	KTConfig = "kt-config"
	// KtUser annotation used for record independent username
	KtUser = "kt-user"
	// KTRefCount the count of shared
	KTRefCount = "kt-ref-count"
	// KTLastHeartBeat timestamp of last heart beat
	KTLastHeartBeat = "kt-last-heart-beat"
	// KtExchangeContainer name of exchange ephemeral container
	KtExchangeContainer = "kt-exchange"

	// SSHPrivateKeyName ssh private key name
	SSHPrivateKeyName = "kt_%s" + PostfixRsaKey
	// SSHBitSize ssh bit size
	SSHBitSize = 2048
	// SSHAuthKey auth key name
	SSHAuthKey = "authorized"
	// SSHAuthPrivateKey ssh private key
	SSHAuthPrivateKey = "privateKey"
	// DefNamespace default namespace
	DefNamespace = "default"
)

Variables

View Source
var (
	// AllKtComponents kt commands available
	AllKtComponents = [4]string{"connect", "exchange", "mesh", "provide"}
)

Functions

func IsCommandExecError

func IsCommandExecError(err error) bool

IsCommandExecError check the error type

Types

type CommandExecError

type CommandExecError struct {
	Reason string
}

CommandExecError ...

func (CommandExecError) Error

func (e CommandExecError) Error() string

Jump to

Keyboard shortcuts

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