middleware

package
v0.0.0-...-1dd87cf Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const ClientVersionHeader = "X-client-version"

ClientVersionHeader is the header name of client version

Variables

This section is empty.

Functions

func AuthenticateMiddleware

func AuthenticateMiddleware(capture capture.Capture) gin.HandlerFunc

AuthenticateMiddleware authenticates the request by query upstream TiDB.

func CheckServerReadyMiddleware

func CheckServerReadyMiddleware(capture capture.Capture) gin.HandlerFunc

CheckServerReadyMiddleware checks if the server is ready

func ErrorHandleMiddleware

func ErrorHandleMiddleware() gin.HandlerFunc

ErrorHandleMiddleware puts the error into response

func ForwardToOwnerMiddleware

func ForwardToOwnerMiddleware(p capture.Capture) gin.HandlerFunc

ForwardToOwnerMiddleware forward a request to controller if current server is not controller, or handle it locally.

func LogMiddleware

func LogMiddleware() gin.HandlerFunc

LogMiddleware logs the api requests

Types

This section is empty.

Jump to

Keyboard shortcuts

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