general

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const LockTimeout = 3 * 60

LockTimeout 3 minutes

Variables

This section is empty.

Functions

func CleanupWorkspace

func CleanupWorkspace()

CleanupWorkspace clean workspace

func CreateShadowAndInbound added in v0.2.4

func CreateShadowAndInbound(shadowPodName, portsToExpose string, labels, annotations map[string]string, portNameDict map[int]string) error

func GetDeploymentByResourceName added in v0.3.0

func GetDeploymentByResourceName(resourceName, namespace string) (*appV1.Deployment, error)

func GetOccupiedUser added in v0.3.2

func GetOccupiedUser(labels map[string]string) string

func GetServiceByResourceName added in v0.2.4

func GetServiceByResourceName(resourceName, namespace string) (*coreV1.Service, error)

func GetTargetPorts added in v0.3.3

func GetTargetPorts(svc *coreV1.Service) map[int]string

func LockService added in v0.3.0

func LockService(serviceName, namespace string, times int) (*coreV1.Service, error)

func ParseResourceName added in v0.3.0

func ParseResourceName(resourceName string) (string, string, error)

func Prepare added in v0.3.3

func Prepare() error

Prepare setup log level, time difference and kube config

func RecoverOriginalService

func RecoverOriginalService(svcName, namespace string)

func SetupLogger added in v0.3.5

func SetupLogger()

func SetupProcess

func SetupProcess(componentName string) (chan os.Signal, error)

SetupProcess write pid file and set component type

func SimpleSubCommand added in v0.3.5

func SimpleSubCommand(name, usage string, action func(args []string) error, postHandler func(cmd *cobra.Command)) *cobra.Command

func UnlockService added in v0.2.4

func UnlockService(serviceName, namespace string)

func UpdateServiceSelector added in v0.2.4

func UpdateServiceSelector(svcName, namespace string, selector map[string]string) error

func UsageTemplate added in v0.3.3

func UsageTemplate(showInheritedFlags bool) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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