http

package
v0.0.0-...-01434fe Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(lc fx.Lifecycle, server *Server, errChan chan error)

RunServer handles server start-stop lifecycle.

func ServerModule

func ServerModule() fx.Option

ServerModule is a FX module function wiring internal dependencies.

Types

type Server

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

Server represents an HTTP server.

func NewServer

func NewServer(
	config *configs.ServerConfig,
	muxer *mux.Router,
) *Server

NewServer constructs new HTTP server with the provided muxer.

func (*Server) Start

func (s *Server) Start(ctx context.Context, errChan chan error)

Start starts the HTTP server.

func (*Server) Stop

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

Stop stops the HTTP server.

Jump to

Keyboard shortcuts

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