prerun

package
v1.11.0-beta6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0 Imports: 17 Imported by: 9

Documentation

Index

Constants

View Source
const (
	ContainerNameToCheck = "discovery"
)

Variables

This section is empty.

Functions

func BuildSuggestedUpgradeCommand added in v0.21.2

func BuildSuggestedUpgradeCommand(binaryName string, mismatches []*versionutils.Version) string

visible for testing

func CallParentPrerun

func CallParentPrerun(cmd *cobra.Command, args []string) error

the purpose of this function is to manually run PersistenPreRunE of parent CLI commands. this allows PersistenPreRunE to be defined on multiple nodes in the command tree

func EnableConsulClients

func EnableConsulClients(opts *options.Options) error

func EnableVaultClients

func EnableVaultClients(vault options.Vault) error

func HarmonizeDryRunAndOutputFormat added in v0.18.42

func HarmonizeDryRunAndOutputFormat(opts *options.Options, cmd *cobra.Command) error

func SetKubeConfigEnv added in v0.18.43

func SetKubeConfigEnv(opts *options.Options, cmd *cobra.Command) error

func SetPodNamespaceEnv added in v1.9.0

func SetPodNamespaceEnv(opts *options.Options, cmd *cobra.Command) error

func VersionMismatchWarning added in v0.21.2

func VersionMismatchWarning(opts *options.Options, cmd *cobra.Command) error

func WarnOnMismatch added in v0.21.2

func WarnOnMismatch(ctx context.Context, binaryName string, sv versioncmd.ServerVersion, logger Logger) error

visible for testing

Types

type ContainerVersion added in v0.21.2

type ContainerVersion struct {
	ContainerName string
	Version       *versionutils.Version
}

type Logger added in v0.21.2

type Logger interface {
	Printf(string, ...interface{})
	Println(string)
}

use this logger interface, so that in the unit test we can accumulate lines that were output

Jump to

Keyboard shortcuts

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