router

package
v0.0.0-...-519bf1e Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

func NewRegistry

func NewRegistry(nodeId string, startCompFunc StartComponentFunc) *Registry

func (*Registry) ByComponent

func (r *Registry) ByComponent(componentName string) (router *Router)

func (*Registry) WaitForInflightToDrain

func (r *Registry) WaitForInflightToDrain()

type Router

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

func NewRouter

func NewRouter(componentName string, nodeId string, bufferPool *revproxy.ProxyBufferPool,
	startCompFunc StartComponentFunc) *Router

func (*Router) DestroyIfIdle

func (r *Router) DestroyIfIdle() bool

func (*Router) GetHandlerCount

func (r *Router) GetHandlerCount() (count int64)

func (*Router) GetInflightReqs

func (r *Router) GetInflightReqs() (count int64)

func (*Router) GetState

func (r *Router) GetState() (state State)

func (*Router) HandlerStartLocal

func (r *Router) HandlerStartLocal() (ch <-chan *revproxy.GetProxyRequest)

func (*Router) HandlerStartRemote

func (r *Router) HandlerStartRemote() (ch <-chan *revproxy.GetProxyRequest)

func (*Router) HandlerStop

func (r *Router) HandlerStop()

func (*Router) Route

func (r *Router) Route(ctx context.Context, req *revproxy.Request)

func (*Router) SetRemoteHandlerCounts

func (r *Router) SetRemoteHandlerCounts(urlToHandlerCount map[string]int)

func (*Router) WithStartComponentFunc

func (r *Router) WithStartComponentFunc(f StartComponentFunc) *Router

type StartComponentFunc

type StartComponentFunc func(componentName string)

type State

type State int
const (
	StateOff State = iota
	StatePending
	StateOn
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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