servercomp

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func New

func New(cfg *Config, log *slog.Logger, handler http.Handler) (*Component, error)

func (*Component) Run

func (c *Component) Run() error

func (*Component) Stop

func (c *Component) Stop() error

type Config

type Config struct {
	Address         string        `yaml:"address" env-required:"true"`
	ReadTimeout     time.Duration `yaml:"read_timeout" env-default:"5s"`
	WriteTimeout    time.Duration `yaml:"write_timeout" env-default:"10s"`
	IdleTimeout     time.Duration `yaml:"idle_timeout" env-default:"15s"`
	ShutdownTimeout time.Duration `yaml:"shutdown_timeout" env-default:"30s"`
}

Jump to

Keyboard shortcuts

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