http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConnectionNameHeader 连接名头
	ConnectionNameHeader = "X-Scaf-Connection-Name"
)

Variables

This section is empty.

Functions

func GetTokenHandler

func GetTokenHandler(handler http.Handler) http.HandlerFunc

GetTokenHandler 从请求中获取 Token 并注入上下文的 HTTP 处理器

func NewHTTPHandler

func NewHTTPHandler(
	genericAuthnServer *generic.AuthenticationServer,
	genericStreamsServer *generic.StreamsServer,
	opts Options) http.Handler

NewHTTPHandler 创建 HTTP 请求处理器

func WithLoggerHandler

func WithLoggerHandler(handler http.Handler, logger logr.Logger) http.HandlerFunc

WithLoggerHandler 带 logr.Logger 的 HTTP 处理器

Types

type Options

type Options struct {
	Logger logr.Logger
}

Options 选项

Jump to

Keyboard shortcuts

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