server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

templ: version: v0.2.778

Index

Constants

View Source
const (
	HeaderHXRequest       = "HX-Request"
	HeaderTemplSkipModify = "templ-skip-modify"

	// PathProxyEvents defines the path for templier proxy websocket events endpoint.
	// This path is very unlikely to collide with any path used by the app server.
	PathProxyEvents = "/_templiér/events"

	ReverseProxyRetries         = 20
	ReverseProxyInitialDelay    = 100 * time.Millisecond
	ReverseProxyBackoffExponent = 1.5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PrintJSDebugLogs bool
	AppHost          *url.URL
	ProxyTimeout     time.Duration
}

type Report

type Report struct{ Subject, Body string }

type Server

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

func New

func New(
	httpClient *http.Client,
	stateTracker *statetrack.Tracker,
	reload *broadcaster.SignalBroadcaster,
	config *config.Config,
) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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