httpserver

package
v0.0.0-...-0ba22c9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer is responsible for serving HTTP requests for frontend resources.

func NewHTTPServer

func NewHTTPServer(applicationConfiguration *application.Configuration,
	monitoringConfiguration *monitoring.Configuration, healthcheck *healthcheck.Healthcheck) *HTTPServer

NewHTTPServer method creates new instance of HTTPServer.

func (*HTTPServer) ListenAndServe

func (httpServer *HTTPServer) ListenAndServe()

ListenAndServe method listens and serves requests sent to HTTP handlers.

type IndexHandler

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

IndexHandler is responsible for serving live dashboard page.

func NewIndexHandler

func NewIndexHandler(applicationConfiguration *application.Configuration,
	monitoringConfiguration *monitoring.Configuration, healthcheck *healthcheck.Healthcheck) *IndexHandler

NewIndexHandler method creates a new instance of IndexHandler.

func (*IndexHandler) ServeHTTP

func (indexHandler *IndexHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP method returns the live dashboard page (an applied Index template).

type PageData

type PageData struct {
	LastRefreshTime       string
	RefreshDashboardEvery float64

	HealthStatus healthcheck.HealthStatus
}

PageData stores Index template data.

type ServerMux

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

ServerMux is responsible for routing requests to appropriate handlers.

func NewServerMux

func NewServerMux(indexHandler *IndexHandler, staticHandler http.Handler) *ServerMux

NewServerMux method creates a new instance of ServerMux.

func (*ServerMux) ServeHTTP

func (serverMux *ServerMux) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP method performs routing of requests to appropriate handlers.

Jump to

Keyboard shortcuts

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