server

package
v0.0.0-...-5dc576f Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServersGracefully

func RunServersGracefully(timeoutSeconds time.Duration, servers ...Server)

RunServersGracefully runs all given servers in a graceful way.

func StartServers

func StartServers(servers ...Server) <-chan error

StartServers starts all given servers.

func StopServers

func StopServers(ctx context.Context, servers ...Server)

StopServers stops all given servers.

Types

type Server

type Server interface {
	Start() error
	Stop(ctx context.Context) error
}

Server is an interface for all type of servers.

Directories

Path Synopsis
middleware/logger
Package logger is based on: https://github.com/gin-contrib/logger
Package logger is based on: https://github.com/gin-contrib/logger

Jump to

Keyboard shortcuts

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