server

package
v1.4.2-0...-a592dce Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTcpSocket

func NewTcpSocket(addr string, config *tlsConfig, activate <-chan struct{}) (net.Listener, error)

func NewUnixSocket

func NewUnixSocket(path, group string, activate <-chan struct{}) (net.Listener, error)

func ProfilerSetup

func ProfilerSetup(mainRouter *mux.Router, path string)

Types

type HttpApiFunc

type HttpApiFunc func(version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error

type HttpServer

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

func (*HttpServer) Close

func (s *HttpServer) Close() error

func (*HttpServer) Serve

func (s *HttpServer) Serve() error

type Server

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

func New

func New(cfg *ServerConfig) *Server

func (*Server) AcceptConnections

func (s *Server) AcceptConnections(d *daemon.Daemon)

func (*Server) Close

func (s *Server) Close()

func (*Server) ServeApi

func (s *Server) ServeApi(protoAddrs []string) error

ServeApi loops through all of the protocols sent in to docker and spawns off a go routine to setup a serving http.Server for each.

func (*Server) SetDaemon

func (s *Server) SetDaemon(d *daemon.Daemon)

type ServerConfig

type ServerConfig struct {
	Logging     bool
	EnableCors  bool
	CorsHeaders string
	Version     string
	SocketGroup string
	Tls         bool
	TlsVerify   bool
	TlsCa       string
	TlsCert     string
	TlsKey      string
}

Jump to

Keyboard shortcuts

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