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 GetServerAddr ¶ added in v0.25.0
func GetServerAddr(cmd *cli.Command) *config.ServerAddr
Types ¶
This section is empty.