http

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func COPYCHAN added in v1.0.2

func COPYCHAN[T any](done <-chan struct{}, src chan T) (
	generator func() (tap chan T, destructor func()),
)

func CreateWsHandleFunc added in v1.0.1

func CreateWsHandleFunc(ctx context.Context, subsystem WsSubsystem) func(conn *websocket.Conn)

func ListenAndServe

func ListenAndServe(ctx context.Context) error

func Mux

func Mux(ctx context.Context) http.Handler

func RederWidgets added in v1.0.2

func RederWidgets(w http.ResponseWriter, r *http.Request)

Types

type LoggingHandler

type LoggingHandler struct{ http.Handler }

func (*LoggingHandler) ServeHTTP

func (h *LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WsSubsystem added in v1.0.2

type WsSubsystem interface {
	Dispatch(ctx context.Context, b []byte) error // receive event from obs browser html
	SendChan() chan string                        // channel from server to page
}

WsSubsystem - subsystem with chan for websocket

Jump to

Keyboard shortcuts

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