healthutil

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseTimeInterceptor

func ResponseTimeInterceptor(m map[string]ResponseTimeState) health.Interceptor

Types

type JSONResultWriter

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

func NewJSONResultWriter

func NewJSONResultWriter(m map[string]ResponseTimeState) *JSONResultWriter

func (*JSONResultWriter) Write

func (rw *JSONResultWriter) Write(result *health.CheckerResult, status int, w http.ResponseWriter, _ *http.Request) error

type ResponseTimeState

type ResponseTimeState struct {
	LastResponseTime    time.Duration
	AverageResponseTime time.Duration
}

Jump to

Keyboard shortcuts

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