httpserver

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: BSD-2-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessHttpServerBlock

func ProcessHttpServerBlock(config *cfg.Config, block *hcl.Block, remainingBody hcl.Body) (cfg.Listener, hcl.Diagnostics)

Types

type HttpServer

type HttpServer struct {
	cfg.BaseServer
	Logger    *zap.Logger
	Server    *http.Server
	TLSConfig *tls.Config
	// contains filtered or unexported fields
}

func (*HttpServer) Start

func (h *HttpServer) Start() error

type HttpServerDefinition

type HttpServerDefinition struct {
	Listen      string                  `hcl:"listen"`
	TLS         *cfg.TLSConfig          `hcl:"tls,block"`
	Auth        *cfg.AuthConfig         `hcl:"auth,block"`
	Tracing     hcl.Expression          `hcl:"tracing,optional"`
	Metrics     hcl.Expression          `hcl:"metrics,optional"`
	DefRange    hcl.Range               `hcl:",def_range"`
	StaticFiles []staticFilesDefinition `hcl:"files,block"`
	Handlers    []handlerDefinition     `hcl:"handle,block"`
}

Jump to

Keyboard shortcuts

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