general

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: GPL-3.0 Imports: 27 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

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

func GetDeploymentByResourceName

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

func GetOccupiedUser

func GetOccupiedUser(labels map[string]string) string

func GetServiceByResourceName

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

func GetTargetPorts

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

func LockService

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

func ParseResourceName

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

func Prepare

func Prepare() error

Prepare setup log level, time difference and kube config

func RecoverOriginalService

func RecoverOriginalService(svcName, namespace string)

func SetupLogger

func SetupLogger()

func SetupProcess

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

SetupProcess write pid file and set component type

func SimpleSubCommand

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

func UnlockService

func UnlockService(serviceName, namespace string)

func UpdateServiceSelector

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

func UsageTemplate

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