Documentation ¶
Overview ¶
Package register contains all the logic to print out `minikube start` in JSON
Index ¶
- Variables
- func CloudEvent(log Log, data map[string]string) cloudevents.Event
- func PrintDownload(artifact string)
- func PrintDownloadProgress(artifact, progress string)
- func PrintError(err string)
- func PrintErrorExitCode(err string, exitcode int, additionalArgs ...map[string]string)
- func PrintInfo(message string)
- func PrintStep(message string)
- func PrintWarning(warning string)
- func RecordError(err string)
- func RecordStep(message string)
- func SetEventLogPath(path string)
- func SetOutputFile(w io.Writer)
- type Download
- type DownloadProgress
- type Error
- type Info
- type Log
- type RegStep
- type Register
- type Step
- type Warning
Constants ¶
This section is empty.
Variables ¶
var (
// GetUUID returns the UUID function to use
GetUUID = randomID
)
Functions ¶
func CloudEvent ¶ added in v1.17.1
func CloudEvent(log Log, data map[string]string) cloudevents.Event
CloudEvent creates a CloudEvent from a log object & associated data
func PrintDownload ¶
func PrintDownload(artifact string)
PrintDownload prints a Download type in JSON format
func PrintDownloadProgress ¶
func PrintDownloadProgress(artifact, progress string)
PrintDownloadProgress prints a DownloadProgress type in JSON format
func PrintError ¶ added in v1.12.2
func PrintError(err string)
PrintError prints an Error type in JSON format
func PrintErrorExitCode ¶ added in v1.12.2
PrintErrorExitCode prints an error in JSON format and includes an exit code
func PrintWarning ¶ added in v1.12.2
func PrintWarning(warning string)
PrintWarning prints a Warning type in JSON format
func RecordError ¶ added in v1.12.2
func RecordError(err string)
RecordError records a Record type in JSON format
func RecordStep ¶ added in v1.12.2
func RecordStep(message string)
RecordStep records a Step type in JSON format
func SetEventLogPath ¶ added in v1.12.2
func SetEventLogPath(path string)
SetEventLogPath sets the path of an event log file
func SetOutputFile ¶ added in v1.12.2
SetOutputFile sets the writer to emit all events to
Types ¶
type Download ¶
type Download struct {
// contains filtered or unexported fields
}
Download will be used to notify the user that a download has begun
func NewDownload ¶
NewDownload returns a new download type
type DownloadProgress ¶
type DownloadProgress struct {
// contains filtered or unexported fields
}
DownloadProgress will be used to notify the user around the progress of a download
func NewDownloadProgress ¶
func NewDownloadProgress(artifact, progress string) *DownloadProgress
NewDownloadProgress returns a new download progress type
func (*DownloadProgress) Type ¶
func (s *DownloadProgress) Type() string
Type returns the cloud events compatible type of this struct
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error will be used to notify the user of errors
func NewErrorExitCode ¶ added in v1.12.2
NewErrorExitCode returns an error that has an associated exit code
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info will be used to notify users of any extra info (env variables, options)
type Log ¶
type Log interface {
Type() string
}
Log represents the different types of logs that can be output as JSON This includes: Step, Download, DownloadProgress, Warning, Info, Error
type RegStep ¶
type RegStep string
RegStep is a type representing a distinct step of `minikube start`
const ( InitialSetup RegStep = "Initial Minikube Setup" SelectingDriver RegStep = "Selecting Driver" DownloadingArtifacts RegStep = "Downloading Artifacts" StartingNode RegStep = "Starting Node" UpdatingDriver RegStep = "Updating Driver" PullingBaseImage RegStep = "Pulling Base Image" RunningLocalhost RegStep = "Running on Localhost" RunningRemotely RegStep = "Running Remotely" LocalOSRelease RegStep = "Local OS Release" CreatingContainer RegStep = "Creating Container" CreatingVM RegStep = "Creating VM" ConfiguringLHEnv RegStep = "Configuring Localhost Environment" PreparingKubernetes RegStep = "Preparing Kubernetes" PreparingKubernetesCerts RegStep = "Generating certificates" PreparingKubernetesControlPlane RegStep = "Booting control plane" PreparingKubernetesBootstrapToken RegStep = "Configuring RBAC rules" ConfiguringCNI RegStep = "Configuring CNI" VerifyingKubernetes RegStep = "Verifying Kubernetes" EnablingAddons RegStep = "Enabling Addons" Done RegStep = "Done" Stopping RegStep = "Stopping" PowerOff RegStep = "PowerOff" Deleting RegStep = "Deleting" Pausing RegStep = "Pausing" Unpausing RegStep = "Unpausing" )
If you add a new step here, please also add it to register.Reg registry inside the init() function
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
Register holds all of the steps we could see in `minikube start` and keeps track of the current step
var Reg Register
Reg keeps track of all possible steps and the current step we are on
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step represents a normal step in minikube execution
type Warning ¶
type Warning struct {
// contains filtered or unexported fields
}
Warning will be used to notify the user of warnings
func NewWarning ¶ added in v1.12.2
NewWarning returns a new warning type