server

package
v0.0.0-...-ca0f7d1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventBeforeStop  = "web:before.stop"
	EventAfterStop   = "web:after.stop"
	EventBeforeStart = "web:before.start"
)

События генерируемые до/после совершения действий над веб сервером

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server с публикацией событйи о своем состоянии в Event Bus

func New

func New(addr string, h http.Handler, p eventPublisher) *Server

New инициализация севрера с настройками и зависимостями

func (*Server) Start

func (s *Server) Start() error

Start web сервера

func (*Server) Stop

func (s *Server) Stop() error

Stop web сервера c плавным завершением всех входящих запросов

Jump to

Keyboard shortcuts

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