http

package
v0.0.0-...-86aec00 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 10 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 {
	Host              string `validate:"required"`
	Port              uint32 `validate:"required,gt=1024,lt=65535"`
	WriteTimeout      int    `yaml:"write-timeout" validate:"gt=-1,lt=60"`
	ReadTimeout       int    `yaml:"read-timeout" validate:"gt=-1,lt=60"`
	ReadHeaderTimeout int    `yaml:"read-header-timeout" validate:"gt=-1,lt=60"`
}

type HTTPServer

type HTTPServer struct {
	Engine *gin.Engine
	// contains filtered or unexported fields
}

func New

func New(registry *prometheus.Registry, logger *slog.Logger, config Config) (*HTTPServer, error)

func (*HTTPServer) Start

func (h *HTTPServer) Start() error

func (*HTTPServer) Stop

func (h *HTTPServer) Stop() error

Jump to

Keyboard shortcuts

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