local

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFakeTokenInject added in v0.7.1

func WithFakeTokenInject(handler http.Handler, serializerManager *serializer.SerializerManager) http.Handler

Types

type IsHealthy

type IsHealthy func() bool

IsHealthy is func for fetching healthy status of remote server

type LocalProxy

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

LocalProxy is responsible for handling requests when remote servers are unhealthy

func NewLocalProxy

func NewLocalProxy(cacheMgr manager.CacheManager, isCloudHealthy IsHealthy, isCoordinatorHealthy IsHealthy, minRequestTimeout time.Duration) *LocalProxy

NewLocalProxy creates a *LocalProxy

func (*LocalProxy) ServeHTTP

func (lp *LocalProxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler for LocalProxy

Jump to

Keyboard shortcuts

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