httpserver

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 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"`
	RealIP      *realIPConfig                `hcl:"real_ip,block"`
	Tracing     hcl.Expression               `hcl:"tracing,optional"`
	Metrics     hcl.Expression               `hcl:"metrics,optional"`
	Baggage     *hclutil.BaggageFilterConfig `hcl:"baggage,block"`
	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