clientcmd

package
v0.4.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 39 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package clientcmd implements the command line of the porthole client binary.

Index

Constants

View Source
const ExitConfig = exitcode.Config

ExitConfig is the exit status for a problem that restarting cannot fix (sysexits.h EX_CONFIG): a broken config or tunnels file, missing credentials, a token the server rejects. The systemd unit lists it in RestartPreventExitStatus so that a bad configuration does not turn into a restart loop.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

ExitCode returns the process exit status for the error returned by the root command, see the table in docs/client.md: the Code of an *ExitError anywhere in the chain, else the status that classify gives the error (connection, authentication, rejected tunnel, daemon), else 1.

func Main

func Main(ctx context.Context, version string) int

Main runs the porthole command line and returns the process exit status. Failures are reported on stderr, or as an error document on stdout with --json.

func NewRoot

func NewRoot(version string) *cobra.Command

NewRoot returns the root command of the porthole client.

Types

type ExitError

type ExitError = exitcode.Error

ExitError is an error that asks for a specific process exit status.

Jump to

Keyboard shortcuts

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