server

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 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 {
	HTTPListenPort    int    `yaml:"http_listen_port" mapstructure:"http_listen_port"`
	MetricsListenPort int    `yaml:"metrics_listen_port" mapstructure:"metrics_listen_port"`
	MetricsNamespace  string `yaml:"metrics_namespace" mapstructure:"metrics_namespace"`
	LogFormat         string `yaml:"log_format" mapstructure:"log_format"`
	LogLevel          string `yaml:"log_level" mapstructure:"log_level"`
}

type Server

type Server struct {
	Mux        *http.ServeMux
	MetricsMux *http.ServeMux
	// contains filtered or unexported fields
}

func New

func New(cfg Config, logger *slog.Logger) (*Server, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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