http

package
v0.0.0-...-bd33cbc Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewApi

func NewApi() *API

func (*API) CreateChannel

func (a *API) CreateChannel(w http.ResponseWriter, r *http.Request)

func (*API) CreatePublisher

func (a *API) CreatePublisher(w http.ResponseWriter, r *http.Request)

func (*API) CreateStream

func (a *API) CreateStream(w http.ResponseWriter, r *http.Request)

func (*API) DeleteChannel

func (a *API) DeleteChannel(w http.ResponseWriter, r *http.Request)

func (*API) GetChannel

func (a *API) GetChannel(w http.ResponseWriter, r *http.Request)

func (*API) ListChannels

func (a *API) ListChannels(w http.ResponseWriter, r *http.Request)

func (*API) RegisterRoutes

func (a *API) RegisterRoutes(mux *httprouter.Router)

func (*API) UpdateChannel

func (a *API) UpdateChannel(w http.ResponseWriter, r *http.Request)

type ChannelService

type ChannelService interface {
	CreateChannel() (ID int)
}

type Option

type Option func(*Server) error

func Certificate

func Certificate(cert tls.Certificate) Option

func CertificateFile

func CertificateFile(file string) Option

func CertificateKeyFile

func CertificateKeyFile(file string) Option

func H1Address

func H1Address(address string) Option

func H2Address

func H2Address(address string) Option

func H3Address

func H3Address(address string) Option

func Handle

func Handle(handler http.Handler) Option

func ListenH2

func ListenH2(enabled bool) Option

func ListenH3

func ListenH3(enabled bool) Option

func RedirectH1ToH3

func RedirectH1ToH3(enabled bool) Option

func RequestLogger

func RequestLogger(logger *slog.Logger) Option

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...Option) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

Jump to

Keyboard shortcuts

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