api

package
v0.0.3-0...-d907587 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRoutes

func BuildRoutes(state *projection.State, eventChan chan<- events.Event) *mux.Router

BuildRoutes returns a mux router with all API routes

func GracefulShutdownOnSignal

func GracefulShutdownOnSignal(signals []syscall.Signal, shutdownProcedure func())

GracefulShutdownOnSignal will run the supplied shutdown procedure when one of the specified signals is received

func ShutdownHTTPServer

func ShutdownHTTPServer(server *http.Server, timeout time.Duration)

ShutdownHTTPServer will allow all connections to drain before closing the server

func StartHTTPSServer

func StartHTTPSServer(addr string, TLSCertPath, TLSKeyPath string, routes http.Handler) (server *http.Server)

StartHTTPSServer creates an HTTPS server on the specified address using the supplied certificate and key

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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