Documentation
¶
Index ¶
- func ContextWithGateway(ctx context.Context, gateway net.Destination) context.Context
- func ContextWithInboundTag(ctx context.Context, tag string) context.Context
- func ContextWithRawConn(ctx context.Context, conn net.Conn) context.Context
- func ContextWithSrc(ctx context.Context, src net.Destination) context.Context
- func GatewayFromContext(ctx context.Context) (net.Destination, bool)
- func GetCtx(src, gateway net.Destination, tag string) (context.Context, context.CancelCauseFunc)
- func InboundTagFromContext(ctx context.Context) (string, bool)
- func RawConnFromContext(ctx context.Context) (net.Conn, bool)
- func SrcFromContext(ctx context.Context) (net.Destination, bool)
- type InboundCtxKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithGateway ¶
func ContextWithInboundTag ¶
func ContextWithRawConn ¶
only add conn to ctx when it is a tcp conn
func ContextWithSrc ¶
func GatewayFromContext ¶
func GatewayFromContext(ctx context.Context) (net.Destination, bool)
func GetCtx ¶
func GetCtx(src, gateway net.Destination, tag string) (context.Context, context.CancelCauseFunc)
func SrcFromContext ¶
func SrcFromContext(ctx context.Context) (net.Destination, bool)
Types ¶
type InboundCtxKey ¶
type InboundCtxKey int
const ( InboundTagKey InboundCtxKey = iota SrcKey GatewayKey IDKey RawConnKey )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package channel provides the implementation of channel-based data-link layer endpoints.
|
Package channel provides the implementation of channel-based data-link layer endpoints. |
Click to show internal directories.
Click to hide internal directories.