router

package
v0.0.0-...-426aaea Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TcpHandlerFunc

type TcpHandlerFunc func(*TcpRouterContext)

type TcpRouter

type TcpRouter struct {
	// contains filtered or unexported fields
}

func NewTcpRouter

func NewTcpRouter() *TcpRouter

func (*TcpRouter) Serve

func (r *TcpRouter) Serve(fn func(*TcpRouterContext) endpoint.TcpHandler)

func (*TcpRouter) ServeTCP

func (r *TcpRouter) ServeTCP(ctx context.Context, conn net.Conn)

func (*TcpRouter) Use

func (r *TcpRouter) Use(middlewares ...TcpHandlerFunc) *TcpRouter

type TcpRouterContext

type TcpRouterContext struct {
	Conn net.Conn
	Ctx  context.Context
	// contains filtered or unexported fields
}

func (*TcpRouterContext) Abort

func (c *TcpRouterContext) Abort()

func (*TcpRouterContext) Get

func (c *TcpRouterContext) Get(key interface{}) interface{}

func (*TcpRouterContext) IsAborted

func (c *TcpRouterContext) IsAborted() bool

func (*TcpRouterContext) Next

func (c *TcpRouterContext) Next()

func (*TcpRouterContext) Reset

func (c *TcpRouterContext) Reset()

func (*TcpRouterContext) Set

func (c *TcpRouterContext) Set(key, val interface{})

Jump to

Keyboard shortcuts

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