Documentation
¶
Index ¶
- Variables
- func CheckProcessRunning(pidPath string) (found bool, pid int, err error)
- func CopyAllFiles(srcDir, destDir string) error
- func CopyFile(srcPath, dstPath string) error
- func CopySymLink(source, dest string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func CreateKubeClient(ctx context.Context, kubeConfigPath string) (client *kubernetes.Clientset, err error)
- func CreateNamespace(ctx context.Context, client kubernetes.Interface, name string) (err error)
- func CreateUpdateDummyApp(ctx context.Context, client kubernetes.Interface, ...) error
- func DirExists(dirpath string) bool
- func Exists(filePath string) bool
- func FileExists(filepath string) bool
- func FindAndKillProcess(ctx context.Context, name string) (pids []int, err error)
- func FindAndKillProcesses(ctx context.Context, names ...string) (allPids []int, err error)
- func FindPidsByName(ctx context.Context, name string) (pids []int, err error)
- func GetGoSourceDir(relProjDir string) string
- func GoBuild(ctx context.Context, projDir, mainFile, binPath string, skipBuild bool) error
- func GoInstall(ctx context.Context, toolPathWithVersion string) error
- func InvokeCommand(cmd *exec.Cmd) (capturedOutput string, err error)
- func InvokeCommandAndCaptureOutput(cmd *exec.Cmd, outPath string) (err error)
- func LaunchBackgroundCommand(cmd *exec.Cmd, logPath string, pidPath string) error
- func LaunchCommand(cmd *exec.Cmd, logPath string, pidPath string, cancel context.CancelFunc) error
- func LoadDeployemntYAML(filepath string) (deployment appsv1.Deployment, err error)
- func PKill(ctx context.Context, names ...string) error
- func Pgrep(ctx context.Context, name string) (pids []string)
- func ReadJson[T any](jpath string) (obj T, err error)
- func ReadJsonInto[T any](jpath string, obj *T) (err error)
- func ReadPidPath(pidPath string) (found bool, pid int, err error)
- func WaitForSignalAndShutdown(ctx context.Context, cancelFunc context.CancelFunc)
- func WriteJson(jpath string, obj any) error
- type ClusterCoordinate
- type ClusterInfo
- type GardenCtl
- func (g *GardenCtl) ExecuteCommandOnPlane(ctx context.Context, plane GardenerPlane, kubectlCommand string) (capturedOut string, err error)
- func (g *GardenCtl) GetKubeConfigPath(ctx context.Context, plane GardenerPlane) (kubeConfigPath string, err error)
- func (g *GardenCtl) GetShootNamespace(ctx context.Context) (shootNamespace string, err error)
- type GardenerPlane
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserHomeDir string GoPathDir string GoBinDir string )
Functions ¶
func CheckProcessRunning ¶
func CopyAllFiles ¶
CopyAllFiles copies all files from srcDir to the destDir
func CopySymLink ¶
func CreateKubeClient ¶
func CreateNamespace ¶
func CreateUpdateDummyApp ¶
func FileExists ¶
func FindAndKillProcess ¶
func FindAndKillProcesses ¶
func GetGoSourceDir ¶
func GoBuild ¶
GoBuild invokes `go build -o binPath -v -buildvcs=true mainFile` within the given projDir
func LaunchBackgroundCommand ¶
func LaunchCommand ¶
func LoadDeployemntYAML ¶
func LoadDeployemntYAML(filepath string) (deployment appsv1.Deployment, err error)
func ReadJsonInto ¶
func WaitForSignalAndShutdown ¶
func WaitForSignalAndShutdown(ctx context.Context, cancelFunc context.CancelFunc)
Types ¶
type ClusterCoordinate ¶
type ClusterInfo ¶
type ClusterInfo struct { ClusterCoordinate ShootNamespace string }
type GardenCtl ¶
type GardenCtl struct {
Coordinate ClusterCoordinate
}
func NewGardenCtl ¶
func NewGardenCtl(coord ClusterCoordinate) *GardenCtl
func (*GardenCtl) ExecuteCommandOnPlane ¶
func (*GardenCtl) GetKubeConfigPath ¶
type GardenerPlane ¶
type GardenerPlane int
const ( DataPlane GardenerPlane = 0 ControlPlane GardenerPlane = 1 )
Click to show internal directories.
Click to hide internal directories.