mgmterrors

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Amount of time to wait after a restart failed because nodes weren't down yet
	RestartNodesNotDownRequeueWaitTimeInSeconds = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ATErrors

type ATErrors struct {
	Writer               EVWriter
	VDB                  *vapi.VerticaDB
	GenericFailureReason string // The failure reason when no specific error is found
}

ATErrors handles event logging for errors that come back from admintools

func (*ATErrors) LogFailure

func (a *ATErrors) LogFailure(cmd, op string, err error) (ctrl.Result, error)

LogFailure is called when admintools had attempted an option but failed. The command used, along with the output of the command are given. This function will parse the output and determine the appropriate Event and log message to write.

type EVWriter

type EVWriter interface {
	Event(vdb *vapi.VerticaDB, eventtype, reason, message string)
	Eventf(vdb *vapi.VerticaDB, eventtype, reason, messageFmt string, args ...interface{})
}

EVWriter is an interface for writing k8s events

type EventLogger

type EventLogger interface {
	// LogFailure is called when the management SDK had attempted a command
	// but failed. The command used, along with the output of the command are
	// given. This function will parse the output and determine the appropriate
	// Event and log message to write. It will also determine the appropriate
	// ctrl.Result to bubble back up.
	LogFailure(cmd, op string, err error) (ctrl.Result, error)
}

func MakeATErrors

func MakeATErrors(writer EVWriter, vdb *vapi.VerticaDB, genericFailureReason string) EventLogger

MakeATErrors will consturct the ATErrors struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳