Documentation
¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_PROTOCOL = "tcp" DEFAULT_ADDRESS = "0.0.0.0:8080" MAX_RETRIES = 5 CLIENT_RETRY_PERIOD = time.Second )
Variables ¶
View Source
var HelperCmd = &cobra.Command{ Use: "k8s-helper", Short: "Helper for running in Kubernetes", RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() restart, _ := cmd.Flags().GetBool("restart") if restart { if err := runScript(ctx, restartScript, true); err != nil { return fmt.Errorf("error restarting: %w", err) } } setupHost, _ := cmd.Flags().GetBool("setup-host") if setupHost { if err := runScript(ctx, setupHostScript, true); err != nil { return fmt.Errorf("error setting up host: %w", err) } } startChroot, _ := cmd.Flags().GetBool("start-chroot") startChroot = startChroot || setupHost return startHelper(ctx, startChroot, DEFAULT_ADDRESS, DEFAULT_PROTOCOL) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.