Help us shape the future of Go! Take the 2026 Go Developer Survey

serverconfig

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package serverconfig parses and validates HTTP service configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Name            string
	Enabled         bool
	Addr            string
	Mode            string
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	IdleTimeout     time.Duration
	ShutdownTimeout time.Duration
}

Service describes one HTTP server instance.

func Parse

func Parse(cfg datacontract.Config) ([]Service, error)

Parse reads server.http. The single-service shorthand and named services form are intentionally mutually exclusive.

Jump to

Keyboard shortcuts

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