Documentation ¶
Index ¶
- type BindOption
- func BacklogBindOption(backlog int) BindOption
- func LoggerBindOption(logger logger.ILogger) 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 DialOption
- type DialOptions
- type HTTPBodyRewriteSettings
- type HTTPNodeSettings
- type HTTPURLRewriteSetting
- type IChainer
- type IRoute
- type Node
- type NodeFilterSettings
- type NodeOption
- func BypassNodeOption(bp bypass.IBypass) NodeOption
- func HTTPNodeOption(httpSettings *HTTPNodeSettings) NodeOption
- func HostMapperNodeOption(m hosts.IHostMapper) NodeOption
- func MatcherNodeOption(matcher routing.Matcher) NodeOption
- func MetadataNodeOption(md metadata.IMetaData) NodeOption
- func NetworkNodeOption(network string) NodeOption
- func NodeFilterOption(filter *NodeFilterSettings) NodeOption
- func PriorityNodeOption(priority int) NodeOption
- func ResoloverNodeOption(resolver resolver.IResolver) NodeOption
- func TLSNodeOption(tlsSettings *TLSNodeSettings) NodeOption
- func TransportNodeOption(tr Transporter) NodeOption
- type NodeOptions
- type RouteOption
- type RouteOptions
- type Router
- type RouterOption
- func ChainRouterOption(chain IChainer) RouterOption
- func HostMapperRouterOption(m hosts.IHostMapper) RouterOption
- func InterfaceRouterOption(ifceName string) RouterOption
- func LoggerRouterOption(logger logger.ILogger) RouterOption
- func NetnsRouterOption(netns string) RouterOption
- func RecordersRouterOption(recorders ...recorder.RecorderObject) RouterOption
- func ResolverRouterOption(resolver resolver.IResolver) 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.ILogger) 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 DialOption ¶
type DialOption func(opts *DialOptions)
func InterfaceDialOption ¶
func InterfaceDialOption(ifName string) DialOption
func LoggerDialOption ¶
func LoggerDialOption(logger logger.ILogger) DialOption
func NetnsDialOption ¶ added in v0.0.8
func NetnsDialOption(netns string) DialOption
func SockOptsDialOption ¶
func SockOptsDialOption(so *SockOpts) DialOption
type DialOptions ¶
type HTTPBodyRewriteSettings ¶ added in v0.0.11
type HTTPNodeSettings ¶
type HTTPNodeSettings struct { Host string RequestHeader map[string]string ResponseHeader map[string]string Auther auth.IAuthenticator RewriteURL []HTTPURLRewriteSetting RewriteResponseBody []HTTPBodyRewriteSettings }
type HTTPURLRewriteSetting ¶ added in v0.0.2
type IChainer ¶
type IChainer interface {
Route(ctx context.Context, network, address string, opts ...RouteOption) IRoute
}
type Node ¶
func (*Node) Options ¶
func (node *Node) Options() *NodeOptions
type NodeFilterSettings ¶ added in v0.0.7
type NodeOption ¶
type NodeOption func(*NodeOptions)
func BypassNodeOption ¶
func BypassNodeOption(bp bypass.IBypass) NodeOption
func HTTPNodeOption ¶
func HTTPNodeOption(httpSettings *HTTPNodeSettings) NodeOption
func HostMapperNodeOption ¶
func HostMapperNodeOption(m hosts.IHostMapper) NodeOption
func MatcherNodeOption ¶ added in v0.0.11
func MatcherNodeOption(matcher routing.Matcher) NodeOption
func MetadataNodeOption ¶
func MetadataNodeOption(md metadata.IMetaData) NodeOption
func NetworkNodeOption ¶
func NetworkNodeOption(network string) NodeOption
func NodeFilterOption ¶ added in v0.0.7
func NodeFilterOption(filter *NodeFilterSettings) NodeOption
func PriorityNodeOption ¶ added in v0.0.11
func PriorityNodeOption(priority int) NodeOption
func ResoloverNodeOption ¶
func ResoloverNodeOption(resolver resolver.IResolver) 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.IBypass Resolver resolver.IResolver HostMapper hosts.IHostMapper Filter *NodeFilterSettings HTTP *HTTPNodeSettings TLS *TLSNodeSettings Metadata metadata.IMetaData 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 IChainer) RouterOption
func HostMapperRouterOption ¶
func HostMapperRouterOption(m hosts.IHostMapper) RouterOption
func InterfaceRouterOption ¶
func InterfaceRouterOption(ifceName string) RouterOption
func LoggerRouterOption ¶
func LoggerRouterOption(logger logger.ILogger) RouterOption
func NetnsRouterOption ¶ added in v0.0.8
func NetnsRouterOption(netns string) RouterOption
func RecordersRouterOption ¶
func RecordersRouterOption(recorders ...recorder.RecorderObject) RouterOption
func ResolverRouterOption ¶
func ResolverRouterOption(resolver resolver.IResolver) 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 ¶ added in v0.0.8
func NetnsTransportOption(netns string) TransportOption
func RouteTransportOption ¶
func RouteTransportOption(route IRoute) TransportOption
func SockOptsTransportOption ¶
func SockOptsTransportOption(so *SockOpts) TransportOption
type TransportOptions ¶
type Transporter ¶ added in v0.0.11
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.