proxy

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackwardProxy deprecated

type BackwardProxy = ReverseProxy

Deprecated: BackwardProxy is deprecated, use ReverseProxy instead.

type Config

type Config struct {
	ServerInfo   *rpcinfo.EndpointBasicInfo
	Resolver     discovery.Resolver
	Balancer     loadbalance.Loadbalancer
	Pool         remote.ConnPool
	FixedTargets string // A comma separated list of host ports that user specify to use.
	RPCConfig    rpcinfo.RPCConfig
}

Config contains basic components used in service discovery process.

type ContextHandler added in v0.1.0

type ContextHandler interface {
	HandleContext(context.Context) context.Context
}

ContextHandler is to handle context info, it just be used for passing params when client/server initialization. Eg: Customized endpoint.MiddlewareBuilder need get init information to judge if it is necessary to add the middleware into the call chain.

type ForwardProxy

type ForwardProxy interface {
	// Configure is provided to initialize the proxy.
	Configure(*Config) error

	// ResolveProxyInstance set instance for remote endpoint.
	ResolveProxyInstance(ctx context.Context) error
}

ForwardProxy manages the service discovery, load balance and connection pooling processes.

type ReverseProxy added in v0.1.0

type ReverseProxy interface {
	Replace(net.Addr) (net.Addr, error)
}

ReverseProxy replaces the listen address with another one.

type WithMiddleware added in v0.8.0

type WithMiddleware interface {
	// ProxyMiddleware returns a middleware which implement proxy logic.
	ProxyMiddleware() endpoint.Middleware
}

WithMiddleware provides function to customize proxy middleware implementation.

Jump to

Keyboard shortcuts

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