server

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PulseHandler

func PulseHandler(rw http.ResponseWriter, req *http.Request)

PulseHandler is the simplest possible handler function - used to expose an endpoint which a load balancer can ping to verify that a node is running and accepting connections.

Types

type Server

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

Server is our top level type, contains all other components, is responsible for starting and stopping them in the correct order.

func NewServer

func NewServer(addr, connStr string, verbose bool, logger kitlog.Logger) *Server

NewServer returns a new simple HTTP server.

func (*Server) Start

func (s *Server) Start() error

Start starts the server running. We also create a channel listening for interrupt signals before gracefully shutting down.

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server running.

Jump to

Keyboard shortcuts

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