handler

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

func NewProxy

func NewProxy(l *logrus.Logger) *Proxy

func (*Proxy) Connect

func (p *Proxy) Connect(r *http.Request) (*websocket.Conn, string, error)

func (*Proxy) GetMonitoringEventTypes

func (p *Proxy) GetMonitoringEventTypes() []string

func (*Proxy) RPCHandler

func (p *Proxy) RPCHandler() *RPCHandler

func (*Proxy) SetObserver

func (p *Proxy) SetObserver(mon monitoring.Observer)

type RPCHandler

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

func (*RPCHandler) GetOrCreateWSUpstreamConnection added in v0.0.4

func (h *RPCHandler) GetOrCreateWSUpstreamConnection(w http.ResponseWriter, r *http.Request) (*Upstream, error)

func (*RPCHandler) ServeHTTP

func (h *RPCHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RunningRequestPayloads added in v0.0.3

type RunningRequestPayloads struct {
	Request   []byte
	ResposeCh chan []byte
}

type Upstream

type Upstream struct {
	Unrecoverable bool
	// contains filtered or unexported fields
}

func (*Upstream) IsRecoverable

func (ws *Upstream) IsRecoverable(err error) bool

func (*Upstream) WriteAndGetResponse

func (ws *Upstream) WriteAndGetResponse(ctx context.Context, id int, req []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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