Documentation
¶
Index ¶
- Constants
- Variables
- func DialClientGRPCServer(ctx context.Context, addr string) (*grpc.ClientConn, error)
- func Execute() error
- func FlagNameToEnvVar(cmdFlag string, prefix string) string
- func SetFlagsFromEnvVars(cmd *cobra.Command)
- func SetupCloseHandler(ctx context.Context, cancel context.CancelFunc)
- func SetupDebugHandler(ctx context.Context, config *profilemanager.Config, recorder *peer.Status, ...)
- func WithBackOff(bf func() error) error
Constants ¶
const (
KubernetesDNSSuffix = "netbird-kubeapi-proxy"
)
Variables ¶
var CLIBackOffSettings = &backoff.ExponentialBackOff{ InitialInterval: time.Second, RandomizationFactor: backoff.DefaultRandomizationFactor, Multiplier: backoff.DefaultMultiplier, MaxInterval: 10 * time.Second, MaxElapsedTime: 30 * time.Second, Stop: backoff.Stop, Clock: backoff.SystemClock, }
CLIBackOffSettings is default backoff settings for CLI commands.
var ErrGetServiceStatus = fmt.Errorf("failed to get service status")
Functions ¶
func DialClientGRPCServer ¶
DialClientGRPCServer returns client connection to the daemon server.
func Execute ¶
func Execute() error
Execute runs the appropriate Cobra command for the CLI. If the process is the update binary it delegates to updateCmd; otherwise it runs the root command. It returns any error produced during command execution.
func FlagNameToEnvVar ¶
FlagNameToEnvVar converts flag name to environment var name adding a prefix, replacing dashes and making all uppercase (e.g. setup-keys is converted to NB_SETUP_KEYS according to the input prefix)
func SetFlagsFromEnvVars ¶
SetFlagsFromEnvVars reads and updates flag values from environment variables with prefix WT_
func SetupCloseHandler ¶
func SetupCloseHandler(ctx context.Context, cancel context.CancelFunc)
SetupCloseHandler handles SIGTERM signal and exits with success
func SetupDebugHandler ¶ added in v0.41.3
func SetupDebugHandler( ctx context.Context, config *profilemanager.Config, recorder *peer.Status, connectClient *internal.ConnectClient, logFilePath string, )
func WithBackOff ¶
WithBackOff execute function in backoff cycle.
Types ¶
This section is empty.
Source Files
¶
- capture.go
- debug.go
- debug_unix.go
- down.go
- expose.go
- forwarding_rules.go
- kubernetes.go
- login.go
- logout.go
- networks.go
- profile.go
- qr.go
- root.go
- service.go
- service_controller.go
- service_installer.go
- service_json_gateway.go
- service_params.go
- service_socket.go
- ssh.go
- ssh_exec_unix.go
- ssh_sftp_unix.go
- state.go
- status.go
- system.go
- trace.go
- up.go
- update.go
- version.go