Documentation ¶
Index ¶
- Constants
- Variables
- func BehaviorOnFatal(f func(string, int))
- func CheckErr(err error)
- func DefaultBehaviorOnFatal()
- func GetCtrlEdgeAdvertisedAddress() (string, error)
- func GetCtrlEdgeAdvertisedPort() (string, error)
- func GetCtrlEdgeApiAddress() (string, error)
- func GetCtrlEdgeApiPort() (string, error)
- func GetCtrlEdgeIdentityEnrollmentDuration() (time.Duration, error)
- func GetCtrlEdgeInterfaceAddress() (string, error)
- func GetCtrlEdgeInterfacePort() (string, error)
- func GetCtrlEdgeRouterEnrollmentDuration() (time.Duration, error)
- func GetCtrlListenerAddress() (string, error)
- func GetCtrlListenerPort() (string, error)
- func GetZitiEdgeRouterListenerBindPort() (string, error)
- func GetZitiEdgeRouterPort() (string, error)
- func GetZitiHome() (string, error)
- func HomeDir() string
- func HostnameOrNetworkName() string
- func JFrogAPIKey() string
- func NormalizePath(input string) string
- func StandardErrorMessage(err error) (string, bool)
- func UsageError(cmd *cobra.Command, format string, args ...interface{}) error
- func WorkingDir() (string, error)
Constants ¶
const ( DefaultErrorExitCode = 1 DefaultWritePermissions = 0760 )
Variables ¶
var ErrExit = fmt.Errorf("exit")
ErrExit may be passed to CheckError to instruct it to output nothing but exit with status code 1.
Functions ¶
func BehaviorOnFatal ¶
BehaviorOnFatal allows you to override the default behavior when a fatal error occurs, which is to call os.Exit(code). You can pass 'panic' as a function here if you prefer the panic() over os.Exit(1).
func CheckErr ¶
func CheckErr(err error)
CheckErr prints a user friendly error to STDERR and exits with a non-zero exit code. Unrecognized errors will be printed with an "error: " prefix.
This method is generic to the command in use and may be used by non-Kubectl commands.
func DefaultBehaviorOnFatal ¶
func DefaultBehaviorOnFatal()
DefaultBehaviorOnFatal allows you to undo any previous override. Useful in tests.
func GetCtrlEdgeAdvertisedAddress ¶ added in v0.28.2
func GetCtrlEdgeAdvertisedPort ¶ added in v0.28.2
func GetCtrlEdgeApiAddress ¶ added in v0.28.2
func GetCtrlEdgeApiPort ¶ added in v0.28.2
func GetCtrlEdgeIdentityEnrollmentDuration ¶ added in v0.28.2
func GetCtrlEdgeInterfaceAddress ¶ added in v0.28.2
func GetCtrlEdgeInterfacePort ¶ added in v0.28.2
func GetCtrlEdgeRouterEnrollmentDuration ¶ added in v0.28.2
func GetCtrlListenerAddress ¶ added in v0.28.2
func GetCtrlListenerPort ¶ added in v0.28.2
func GetZitiEdgeRouterPort ¶
func GetZitiHome ¶
func HostnameOrNetworkName ¶ added in v0.28.2
func HostnameOrNetworkName() string
func JFrogAPIKey ¶
func JFrogAPIKey() string
func NormalizePath ¶
NormalizePath replaces windows \ with / which windows allows for
func StandardErrorMessage ¶
StandardErrorMessage translates common errors into a human readable message, or returns false if the error is not one of the recognized types. It may also log extended information to glog.
This method is generic to the command in use and may be used by non-Kubectl commands.
func WorkingDir ¶
Types ¶
This section is empty.