server

package
v0.0.0-...-8fe63d3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string
	Username     string
	Password     string
	Configurator *configurator.Configurator
	Monitor      *docker.Monitor
}

Config stores the configuration for the HTTP server.

type Server

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

Server provides a web interface for interacting with the application.

func New

func New(cfg *Config) (*Server, error)

New creates a new server.

func (*Server) Close

func (s *Server) Close()

Close shuts down the server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP ensures that HTTP basic auth credentials match the requires ones and then routes the request to the muxer.

Jump to

Keyboard shortcuts

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