httputil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerMultiplexer

type HandlerMultiplexer struct {
	HandlerMap    map[string]http.Handler
	StaticPath    string // 静态文件目录
	StaticHandler http.Handler
}

HandlerMultiplexer HTTP 处理器多路复用器 - CasaOS 兼容

func NewHandlerMultiplexer

func NewHandlerMultiplexer() *HandlerMultiplexer

NewHandlerMultiplexer 创建新的多路复用器

func (*HandlerMultiplexer) Handle

func (m *HandlerMultiplexer) Handle(pattern string, handler http.Handler)

Handle 添加处理器

func (*HandlerMultiplexer) ServeHTTP

func (m *HandlerMultiplexer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP 实现 http.Handler 接口

Jump to

Keyboard shortcuts

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