serverapi

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsServiceAllowed

func IsServiceAllowed(s *server.Server, group apiutil.APIServiceGroup) bool

IsServiceAllowed checks the service through the path.

func NewRedirector

func NewRedirector(s *server.Server, opts ...RedirectorOption) negroni.Handler

NewRedirector redirects request to the leader if needs to be handled in the leader.

func NewRuntimeServiceValidator

func NewRuntimeServiceValidator(s *server.Server, group apiutil.APIServiceGroup) negroni.Handler

NewRuntimeServiceValidator checks if the path is invalid.

Types

type RedirectorOption

type RedirectorOption func(*redirector)

RedirectorOption defines the option of redirector

func MicroserviceRedirectRule

func MicroserviceRedirectRule(matchPath, targetPath, targetServiceName string,
	methods []string, filters ...func(*http.Request) bool) RedirectorOption

MicroserviceRedirectRule new a microservice redirect rule option

Jump to

Keyboard shortcuts

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