proxy

package
v0.0.0-...-988179c Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonReverseProxy

type JsonReverseProxy struct {

	// Optional callbacks for connection events
	OnConnect    func(id string, conn *ProxyConn)
	OnDisconnect func(id string, conn *ProxyConn)
	OnRequest    func(id string, conn *ProxyConn, data []byte)
	OnResponse   func(id string, conn *ProxyConn, data []byte)

	ActiveConnectionsCount int64
	// contains filtered or unexported fields
}

func NewUnixUpstreamJsonRpcProxy

func NewUnixUpstreamJsonRpcProxy(
	path string,
	asyncCallbacks bool,
	multiplexing bool,
	bufferSize int,
	maxRead int,
) *JsonReverseProxy

func (*JsonReverseProxy) AddUnixSocketListener

func (j *JsonReverseProxy) AddUnixSocketListener(context context.Context, path string) error

func (*JsonReverseProxy) DumpDebugInfo

func (j *JsonReverseProxy) DumpDebugInfo()

DumpDebugInfo returns debug information about active connections and decoders

func (*JsonReverseProxy) Listen

func (j *JsonReverseProxy) Listen()

func (*JsonReverseProxy) Shutdown

func (j *JsonReverseProxy) Shutdown()

type ProxyConn

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

type Session

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

func NewSession

func NewSession() *Session

type Upstream

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

func (*Upstream) Intialize

func (u *Upstream) Intialize() error

func (*Upstream) NewConn

func (u *Upstream) NewConn() (net.Conn, error)

func (*Upstream) PooledConn

func (u *Upstream) PooledConn() (net.Conn, error)

Return a random upstream from pool

func (*Upstream) RefillPool

func (u *Upstream) RefillPool() error

func (*Upstream) WriteMsg

func (u *Upstream) WriteMsg(msg []byte, conn net.Conn) (int, error)

Jump to

Keyboard shortcuts

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