Documentation ¶
Index ¶
- type BindOption
- func BacklogBindOption(backlog int) BindOption
- func LoggerBindOption(logger logger.Logger) BindOption
- func MuxBindOption(mux bool) BindOption
- func UDPConnTTLBindOption(ttl time.Duration) BindOption
- func UDPDataBufferSizeBindOption(size int) BindOption
- func UDPDataQueueSizeBindOption(size int) BindOption
- type BindOptions
- type Chainer
- type DialOption
- type DialOptions
- type HTTPBodyRewriteSettings
- type HTTPNodeSettings
- type HTTPURLRewriteSetting
- type Node
- type NodeFilterSettings
- type NodeOption
- func BypassNodeOption(bp bypass.Bypass) NodeOption
- func HTTPNodeOption(httpSettings *HTTPNodeSettings) NodeOption
- func HostMapperNodeOption(m hosts.HostMapper) NodeOption
- func MatcherNodeOption(matcher routing.Matcher) NodeOption
- func MetadataNodeOption(md metadata.Metadata) NodeOption
- func NetworkNodeOption(network string) NodeOption
- func NodeFilterOption(filter *NodeFilterSettings) NodeOption
- func PriorityNodeOption(priority int) NodeOption
- func ResoloverNodeOption(resolver resolver.Resolver) NodeOption
- func TLSNodeOption(tlsSettings *TLSNodeSettings) NodeOption
- func TransportNodeOption(tr Transporter) NodeOption
- type NodeOptions
- type Route
- type RouteOption
- type RouteOptions
- type Router
- type RouterOption
- func ChainRouterOption(chain Chainer) RouterOption
- func HostMapperRouterOption(m hosts.HostMapper) RouterOption
- func InterfaceRouterOption(ifceName string) RouterOption
- func LoggerRouterOption(logger logger.Logger) RouterOption
- func NetnsRouterOption(netns string) RouterOption
- func RecordersRouterOption(recorders ...recorder.RecorderObject) RouterOption
- func ResolverRouterOption(resolver resolver.Resolver) RouterOption
- func RetriesRouterOption(retries int) RouterOption
- func SockOptsRouterOption(so *SockOpts) RouterOption
- func TimeoutRouterOption(timeout time.Duration) RouterOption
- type RouterOptions
- type SockOpts
- type TLSNodeSettings
- type TransportOption
- type TransportOptions
- type Transporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindOption ¶
type BindOption func(opts *BindOptions)
func BacklogBindOption ¶
func BacklogBindOption(backlog int) BindOption
func LoggerBindOption ¶
func LoggerBindOption(logger logger.Logger) BindOption
func MuxBindOption ¶
func MuxBindOption(mux bool) BindOption
func UDPConnTTLBindOption ¶
func UDPConnTTLBindOption(ttl time.Duration) BindOption
func UDPDataBufferSizeBindOption ¶
func UDPDataBufferSizeBindOption(size int) BindOption
func UDPDataQueueSizeBindOption ¶
func UDPDataQueueSizeBindOption(size int) BindOption
type BindOptions ¶
type Chainer ¶
type Chainer interface {
Route(ctx context.Context, network, address string, opts ...RouteOption) Route
}
type DialOption ¶
type DialOption func(opts *DialOptions)
func InterfaceDialOption ¶
func InterfaceDialOption(ifName string) DialOption
func LoggerDialOption ¶
func LoggerDialOption(logger logger.Logger) DialOption
func NetnsDialOption ¶
func NetnsDialOption(netns string) DialOption
func SockOptsDialOption ¶
func SockOptsDialOption(so *SockOpts) DialOption
type DialOptions ¶
type HTTPBodyRewriteSettings ¶
type HTTPNodeSettings ¶
type HTTPNodeSettings struct { Host string RequestHeader map[string]string ResponseHeader map[string]string Auther auth.Authenticator RewriteURL []HTTPURLRewriteSetting RewriteResponseBody []HTTPBodyRewriteSettings }
type HTTPURLRewriteSetting ¶
type Node ¶
func (*Node) Options ¶
func (node *Node) Options() *NodeOptions
type NodeFilterSettings ¶
type NodeOption ¶
type NodeOption func(*NodeOptions)
func BypassNodeOption ¶
func BypassNodeOption(bp bypass.Bypass) NodeOption
func HTTPNodeOption ¶
func HTTPNodeOption(httpSettings *HTTPNodeSettings) NodeOption
func HostMapperNodeOption ¶
func HostMapperNodeOption(m hosts.HostMapper) NodeOption
func MatcherNodeOption ¶
func MatcherNodeOption(matcher routing.Matcher) NodeOption
func MetadataNodeOption ¶
func MetadataNodeOption(md metadata.Metadata) NodeOption
func NetworkNodeOption ¶
func NetworkNodeOption(network string) NodeOption
func NodeFilterOption ¶
func NodeFilterOption(filter *NodeFilterSettings) NodeOption
func PriorityNodeOption ¶
func PriorityNodeOption(priority int) NodeOption
func ResoloverNodeOption ¶
func ResoloverNodeOption(resolver resolver.Resolver) NodeOption
func TLSNodeOption ¶
func TLSNodeOption(tlsSettings *TLSNodeSettings) NodeOption
func TransportNodeOption ¶
func TransportNodeOption(tr Transporter) NodeOption
type NodeOptions ¶
type NodeOptions struct { Network string Transport Transporter Bypass bypass.Bypass Resolver resolver.Resolver HostMapper hosts.HostMapper Filter *NodeFilterSettings HTTP *HTTPNodeSettings TLS *TLSNodeSettings Metadata metadata.Metadata Matcher routing.Matcher Priority int }
type RouteOption ¶
type RouteOption func(opts *RouteOptions)
func WithHostRouteOption ¶
func WithHostRouteOption(host string) RouteOption
type RouteOptions ¶
type RouteOptions struct {
Host string
}
type RouterOption ¶
type RouterOption func(*RouterOptions)
func ChainRouterOption ¶
func ChainRouterOption(chain Chainer) RouterOption
func HostMapperRouterOption ¶
func HostMapperRouterOption(m hosts.HostMapper) RouterOption
func InterfaceRouterOption ¶
func InterfaceRouterOption(ifceName string) RouterOption
func LoggerRouterOption ¶
func LoggerRouterOption(logger logger.Logger) RouterOption
func NetnsRouterOption ¶
func NetnsRouterOption(netns string) RouterOption
func RecordersRouterOption ¶
func RecordersRouterOption(recorders ...recorder.RecorderObject) RouterOption
func ResolverRouterOption ¶
func ResolverRouterOption(resolver resolver.Resolver) RouterOption
func RetriesRouterOption ¶
func RetriesRouterOption(retries int) RouterOption
func SockOptsRouterOption ¶
func SockOptsRouterOption(so *SockOpts) RouterOption
func TimeoutRouterOption ¶
func TimeoutRouterOption(timeout time.Duration) RouterOption
type RouterOptions ¶
type TLSNodeSettings ¶
type TransportOption ¶
type TransportOption func(*TransportOptions)
func AddrTransportOption ¶
func AddrTransportOption(addr string) TransportOption
func InterfaceTransportOption ¶
func InterfaceTransportOption(ifceName string) TransportOption
func NetnsTransportOption ¶
func NetnsTransportOption(netns string) TransportOption
func RouteTransportOption ¶
func RouteTransportOption(route Route) TransportOption
func SockOptsTransportOption ¶
func SockOptsTransportOption(so *SockOpts) TransportOption
type TransportOptions ¶
type Transporter ¶
type Transporter interface { Dial(ctx context.Context, addr string) (net.Conn, error) Handshake(ctx context.Context, conn net.Conn) (net.Conn, error) Connect(ctx context.Context, conn net.Conn, network, address string) (net.Conn, error) Bind(ctx context.Context, conn net.Conn, network, address string, opts ...connector.BindOption) (net.Listener, error) Multiplex() bool Options() *TransportOptions Copy() Transporter }
Click to show internal directories.
Click to hide internal directories.