handler

package
v0.0.0-...-26ed3c2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 8 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

type Forwarder interface {
	Forward(chain.Hop)
}

type HandleOption

type HandleOption func(opts *HandleOptions)

func MetadataHandleOption

func MetadataHandleOption(md metadata.Metadata) HandleOption

type HandleOptions

type HandleOptions struct {
	Metadata metadata.Metadata
}

type Handler

type Handler interface {
	Init(metadata.Metadata) error
	Handle(context.Context, net.Conn, ...HandleOption) error
}

type Option

type Option func(opts *Options)

func AuthOption

func AuthOption(auth *url.Userinfo) Option

func AutherOption

func AutherOption(auther auth.Authenticator) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func RouterOption

func RouterOption(router *chain.Router) Option

func ServiceOption

func ServiceOption(service string) Option

func TLSConfigOption

func TLSConfigOption(tlsConfig *tls.Config) Option

type Options

type Options struct {
	Router    *chain.Router
	Auth      *url.Userinfo
	Auther    auth.Authenticator
	TLSConfig *tls.Config
	Logger    logger.Logger
	Service   string
}

Jump to

Keyboard shortcuts

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