webutil

package
v0.0.0-...-bf1b93e Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFloatQueryParam

func GetFloatQueryParam(r *http.Request, name string, defVal float64) (float64, error)

func GetIntPathParam

func GetIntPathParam(r *http.Request, name string, defVal int) int

func GetIntQueryParam

func GetIntQueryParam(r *http.Request, name string, defVal int) int

func GetStringQueryParam

func GetStringQueryParam(r *http.Request, name, defVal string) string

func HandleCantGetNodes

func HandleCantGetNodes(w http.ResponseWriter, shootName string)

func HandleShootNameMissing

func HandleShootNameMissing(w http.ResponseWriter)

func InternalError

func InternalError(w http.ResponseWriter, err error)

func Log

func Log(w http.ResponseWriter, msg string)

func LogNodePodAssignments

func LogNodePodAssignments(w http.ResponseWriter, scenarioName string, nodePodAssignments []scalesim.NodePodAssignment)

func Logf

func Logf(w http.ResponseWriter, format string, a ...any)

func SetupSSEWriter

func SetupSSEWriter(w http.ResponseWriter)

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Log

func (l *Logger) Log(w http.ResponseWriter, msg string)

Jump to

Keyboard shortcuts

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