router

package
v0.0.0-...-5f4265e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2015 License: Apache-2.0 Imports: 6 Imported by: 23

Documentation

Overview

A test router implementation.

Index

Constants

View Source
const (
	ProtocolHttp  = "http"
	ProtocolHttps = "https"
	ProtocolTls   = "tls"
)
View Source
const (
	TERM_EDGE  = "TERM_EDGE"
	TERM_GEAR  = "TERM_GEAR"
	TERM_RESSL = "TERM_RESSL"
)
View Source
const (
	RouteFile = "/var/lib/containers/router/routes.json"
)

Variables

View Source
var GlobalRoutes map[string]Frontend

Functions

func AddAlias

func AddAlias(alias string, frontendname string)

func AddRoute

func AddRoute(frontendname string, fe_path string, be_path string, protocols []string, endpoints []Endpoint)

func BumpRouter

func BumpRouter()

func CreateFrontend

func CreateFrontend(name string, url string)

func DeleteFrontend

func DeleteFrontend(frontendname string)

func PrintFrontendRoutes

func PrintFrontendRoutes(frontendname string) string

func PrintRoutes

func PrintRoutes() string

func ReadRoutes

func ReadRoutes()

func WriteRoutes

func WriteRoutes()

Types

type Backend

type Backend struct {
	Id           string
	FePath       string
	BePath       string
	Protocols    []string
	EndpointIds  []string
	SslTerm      string
	Certificates []Certificate
}

type Certificate

type Certificate struct {
	Id                 string
	Contents           []byte
	PrivateKey         []byte
	PrivateKeyPassword string
}

type Endpoint

type Endpoint struct {
	Id   string
	IP   string
	Port string
}

type Frontend

type Frontend struct {
	Name          string
	HostAliases   []string
	BeTable       map[string]Backend
	EndpointTable map[string]Endpoint
}

func (*Frontend) Init

func (a *Frontend) Init()

func (Frontend) PrintOut

func (a Frontend) PrintOut()

Directories

Path Synopsis
The gear 'test-router' extension.
The gear 'test-router' extension.
Provides http requests and handlers for router jobs.
Provides http requests and handlers for router jobs.
remote
Provides marshalling and remote execution glue for http router job requests.
Provides marshalling and remote execution glue for http router job requests.
Job implementations for router operations.
Job implementations for router operations.
linux
Linux router job implementations and router initialization.
Linux router job implementations and router initialization.

Jump to

Keyboard shortcuts

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