web

package
v0.0.0-...-de13f5b Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

type FileServer struct {
	FS  fs.FS
	Dir string

	http.Handler `json:"-" cbor:"-"`
}

func (*FileServer) Assemble

func (s *FileServer) Assemble(fsys fs.FS)

func (*FileServer) Provides

func (s *FileServer) Provides() http.Handler

type Listener

type Listener interface {
	net.Listener

	URL() string
}

type MatchRouter

type MatchRouter struct {
	manifold.Component
}

func (*MatchRouter) ServeHTTP

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

type Matcher

type Matcher interface {
	MatchHTTP(req *http.Request) bool
}

type Route

type Route struct {
	Path    string
	Handler http.Handler

	manifold.Component
}

func (*Route) Assemble

func (r *Route) Assemble(h http.Handler)

type Router

type Router struct {
	manifold.Component
}

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Server

type Server struct {
	LaunchBrowser bool
	LaunchPath    string

	Listener Listener
	Handler  http.Handler

	*http.Server `json:"-"`
	manifold.Component
}

func (*Server) Activate

func (s *Server) Activate(ctx context.Context) error

func (*Server) Assemble

func (s *Server) Assemble(l Listener, h http.Handler)

func (*Server) Deactivate

func (s *Server) Deactivate(ctx context.Context) error

type SocketHandler

type SocketHandler interface {
	HandleWS(conn *websocket.Conn)
}

type SocketHandlerAlt

type SocketHandlerAlt interface {
	HandleWS(conn *netws.Conn)
}

type SocketUpgrader

type SocketUpgrader struct {
	Handler    SocketHandler
	HandlerAlt SocketHandlerAlt
	// contains filtered or unexported fields
}

func (*SocketUpgrader) Assemble

func (u *SocketUpgrader) Assemble(h SocketHandler, alt SocketHandlerAlt)

func (*SocketUpgrader) Initialize

func (u *SocketUpgrader) Initialize()

func (*SocketUpgrader) MatchHTTP

func (u *SocketUpgrader) MatchHTTP(req *http.Request) bool

func (*SocketUpgrader) ServeHTTP

func (u *SocketUpgrader) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TCPListener

type TCPListener struct {
	ListenAddr   string
	net.Listener `json:"-"`
}

func (*TCPListener) Activate

func (l *TCPListener) Activate(ctx context.Context) (err error)

func (*TCPListener) Deactivate

func (l *TCPListener) Deactivate(ctx context.Context) error

func (*TCPListener) Initialize

func (l *TCPListener) Initialize()

func (*TCPListener) Provides

func (l *TCPListener) Provides() Listener

func (*TCPListener) URL

func (l *TCPListener) URL() string

Jump to

Keyboard shortcuts

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