Documentation
¶
Index ¶
- func Addr(a string) func(s *Site)
- func Listener(l net.Listener) func(s *Site)
- func Logger(l *slog.Logger) func(s *Site)
- func ServeMux(h httpServeMux) func(s *Site)
- func Server(h httpServer) func(s *Site)
- func Stderr(f io.Writer) func(s *Site)
- func Stdout(f io.Writer) func(s *Site)
- type Site
- func (s *Site) Handle(pattern string, handler http.Handler)
- func (s *Site) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (s *Site) ListenAndServe() error
- func (s *Site) ListenAndServeTLS(certFile, keyFile string) error
- func (s *Site) Logger() *slog.Logger
- func (s *Site) Serve(l net.Listener) error
- func (s *Site) ServeTLS(l net.Listener, certFile, keyFile string) error
- func (s *Site) Shutdown(ctx context.Context) error
- type SiteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Site ¶
type Site struct {
// contains filtered or unexported fields
}
func NewSite ¶
func NewSite(cfgs ...SiteConfig) *Site
func (*Site) HandleFunc ¶
func (*Site) ListenAndServe ¶
func (*Site) ListenAndServeTLS ¶
type SiteConfig ¶
type SiteConfig func(*Site)
Click to show internal directories.
Click to hide internal directories.