Documentation ¶
Index ¶
- 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 WithBackOff(bf func() error) error
Constants ¶
This section is empty.
Variables ¶
View Source
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.
Functions ¶
func DialClientGRPCServer ¶
DialClientGRPCServer returns client connection to the daemon server.
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 WithBackOff ¶
WithBackOff execute function in backoff cycle.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.