echohttp

package
v0.0.0-...-1b88e20 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName             string        `mapstructure:"app_name"`
	Host                string        `mapstructure:"host"`
	Port                int           `mapstructure:"port"`
	ReadTimeout         time.Duration `mapstructure:"read_timeout"`
	WriteTimeout        time.Duration `mapstructure:"write_timeout"`
	IdleTimeout         time.Duration `mapstructure:"idle_timeout"`
	ShutdownTimeout     time.Duration `mapstructure:"shutdown_timeout"`
	MaxHeaderBytes      int           `mapstructure:"max_header_bytes"`
	MaxRequestBodyBytes int           `mapstructure:"max_request_body_bytes"`
	MaxUploadSize       int           `mapstructure:"max_upload_size"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Addr

func (c *Config) Addr() string

type Engine

type Engine interface {
	Start(ctx context.Context) error
}

func New

func New(cfg *Config, log logger.Logger) (Engine, error)

Jump to

Keyboard shortcuts

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