cmdutil

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExplicitServerAddr added in v0.34.0

func ExplicitServerAddr(cmd *cli.Command) *config.ServerAddr

ExplicitServerAddr returns the server the user explicitly targeted via a --server and --token pair (flag or env), or via an --alias that resolves in the config file. It returns nil when neither is given, so inside a space callers can fall back to the server that owns the space.

Note the both-non-empty rule for the flags: spaces always have KNOT_SERVER set to the owning server's URL, so a token alone must never count as an explicit target. An --alias is only honoured when actually given on the command line — the "default" alias is never consulted implicitly, so a config file carried into a space cannot silently redirect tunnels.

func GetClient

func GetClient(cmd *cli.Command) (*apiclient.ApiClient, error)

func GetServerAddr added in v0.25.0

func GetServerAddr(cmd *cli.Command) *config.ServerAddr

Types

This section is empty.

Jump to

Keyboard shortcuts

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