inbound

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithGateway

func ContextWithGateway(ctx context.Context, gateway net.Destination) context.Context

func ContextWithInboundTag

func ContextWithInboundTag(ctx context.Context, tag string) context.Context

func ContextWithRawConn

func ContextWithRawConn(ctx context.Context, conn net.Conn) context.Context

only add conn to ctx when it is a tcp conn

func ContextWithSrc

func ContextWithSrc(ctx context.Context, src net.Destination) context.Context

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 InboundTagFromContext

func InboundTagFromContext(ctx context.Context) (string, bool)

func RawConnFromContext

func RawConnFromContext(ctx context.Context) (net.Conn, bool)

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.
net

Jump to

Keyboard shortcuts

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