server

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 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 Config added in v0.0.9

type Config struct {
	Addr     string
	ConnStr  string
	Verbose  bool
	CertFile string
	KeyFile  string
}

Config is a struct used to pass in configuration from the calling task

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(config *Config, 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