web

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server contains the configuration for the HTTP server

func NewServer

func NewServer(port int32, tlsCertFile, tlsKeyFile string, shutdownGracePeriod time.Duration) *Server

NewServer creates a new Server definition with an empty ServeMux

func (*Server) RegisterService

func (s *Server) RegisterService(service osprey.Osprey)

RegisterService binds the http endpoints to the Osprey services "/access-token" -> Osprey.GetAccessToken()

func (*Server) Start

func (s *Server) Start() error

Start starts a new HTTP server listening at the specified port. If the server configuration contains tls data, it will start the server with TLS enabled. Start is a blocking method that listens for SIGINT or SIGTERM to start a graceful shutdown, with a timeout specified in the server configuration.

Jump to

Keyboard shortcuts

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