http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIPExtractor

func NewIPExtractor() echo.IPExtractor

Types

type Server

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

func NewServer

func NewServer(log *zap.Logger) *Server

func (*Server) Register

func (s *Server) Register(
	ctx context.Context,
	cfg config.Config,
	rdb *redis.Client,
	stor storage.Storage,
	pub pubsub.Publisher,
	sub pubsub.Subscriber,
) error

func (*Server) Start

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

Start the server.

func (*Server) Stop

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

Stop the server.

Directories

Path Synopsis
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