healthz

package
v0.10.3-0...-930112e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContentTypeHeader is the health check request type header.
	ContentTypeHeader = "Content-Type"
	// ContentTypeText is the health check request type text.
	ContentTypeText = "text/plain"
	// ContentTypeJSON is another health check request type text, which response contains more info.
	ContentTypeJSON = "application/json"
)

Variables

This section is empty.

Functions

func Register

func Register(indicator Indicator)

func SetComponentNum

func SetComponentNum(num int)

func UnRegister

func UnRegister(role string)

Types

type GetComponentStatesInterface

type GetComponentStatesInterface interface {
	// GetComponentStates returns the states of component.
	GetComponentStates(ctx context.Context, request *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
}

GetComponentStatesInterface defines the interface that get states from component.

type HealthHandler

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

func Handler

func Handler() *HealthHandler

func (*HealthHandler) ServeHTTP

func (handler *HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HealthResponse

type HealthResponse struct {
	State  string            `json:"state"`
	Detail []*IndicatorState `json:"detail"`
}

type Indicator

type Indicator interface {
	GetName() string
	Health(ctx context.Context) commonpb.StateCode
}

type IndicatorState

type IndicatorState struct {
	Name string             `json:"name"`
	Code commonpb.StateCode `json:"code"`
}

Jump to

Keyboard shortcuts

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