httpserver

package
v0.0.0-...-e89239d Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                 int  `yaml:"port"`
	EnableAccessLogs     bool `yaml:"enable-access-logs"`
	EnableHealthEndpoint bool `yaml:"enable-health-endpoint"`
}

Config http server configuration

type HTTPServer

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

HTTPServer application server HTTP server uses labstack/echo

func New

func New(l *logging.Logger, cfg Config) *HTTPServer

New creates the HTTP server

func (*HTTPServer) SetOnStartCallback

func (h *HTTPServer) SetOnStartCallback(cb func(*echo.Echo))

SetOnStartCallback register a startup callback just before listening to the configured port

func (*HTTPServer) Start

func (h *HTTPServer) Start()

Start the HTTP server & run onStartCallback callback if defined

Jump to

Keyboard shortcuts

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