dockrouted

package
v0.0.0-...-3476a7f Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func StartupService

func StartupService(args Args)

Types

type Args

type Args struct {
	Listen   string `arg:"-l,help: [Host:]Port the address to listen on (:8080)" env:"DOCKROUTE_LISTEN"`
	LogInfo  bool   `arg:"--log-info,help: Log on INFO level (false)" env:"DOCKROUTE_LOG_INFO"`
	LogDebug bool   `arg:"--log-debug,help: Log on DEBUG level (false)" env:"DOCKROUTE_LOG_DEBUG"`
	LogJSON  bool   `arg:"--log-json,help: Log in JSON format (false)" env:"DOCKROUTE_LOG_JSON"`
}

type Backend

type Backend interface {
	GetService(name string) (hostAndPort string, err error)
}

type DockerDiscovery

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

func NewDockerDiscovery

func NewDockerDiscovery() *DockerDiscovery

func (*DockerDiscovery) GetService

func (dd *DockerDiscovery) GetService(name string) (hostAndPort string, err error)

type Proxy

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

func NewProxy

func NewProxy(b Backend) *Proxy

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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