server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

templ: version: v0.2.707

Index

Constants

View Source
const PathProxyEvents = "/_templiér/events"

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.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PrintJSDebugLogs bool
	AppHostAddr      string
	ProxyTimeout     time.Duration
}

type Server

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

func New

func New(
	httpClient *http.Client,
	stateTracker *state.Tracker,
	reloadInitiated *broadcaster.SignalBroadcaster,
	reload *broadcaster.SignalBroadcaster,
	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