http

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(log *zap.Logger) *Server

NewServer creates new server instance.

func (*Server) Register

func (s *Server) Register(ctx context.Context, cfg config.Config) error

Register server routes, middlewares, etc.

func (*Server) Start

func (s *Server) Start(ip string, port uint16) error

Start server.

func (*Server) Stop

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

Stop server.

Directories

Path Synopsis
healthz
Package healthz contains healthcheck handler.
Package healthz contains healthcheck handler.
metrics
Package metrics contains HTTP handler for application metrics (prometheus format) generation.
Package metrics contains HTTP handler for application metrics (prometheus format) generation.
middlewares
logreq
Package logreq contains middleware for HTTP requests logging using "zap" package.
Package logreq contains middleware for HTTP requests logging using "zap" package.
panic
Package panic contains middleware for panics (inside HTTP handlers) logging using "zap" package.
Package panic contains middleware for panics (inside HTTP handlers) logging using "zap" package.

Jump to

Keyboard shortcuts

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