templaterouter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolHTTP  = "http"
	ProtocolHTTPS = "https"
	ProtocolTLS   = "tls"
)
View Source
const (
	TermEdge  = "TERM_EDGE"
	TermGear  = "TERM_GEAR"
	TermRessl = "TERM_RESSL"
)
View Source
const (
	RouteFile = "/var/lib/containers/router/routes.json"
)

Variables

This section is empty.

Functions

This section is empty.

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
	Backends      map[string]Backend
	EndpointTable map[string]Endpoint
}

type TemplatePlugin

type TemplatePlugin struct {
	Router router
}

TemplatePlugin implements the router.Plugin interface to provide a template based, backend-agnostic router.

func NewTemplatePlugin

func NewTemplatePlugin(templatePath, reloadScriptPath string) (*TemplatePlugin, error)

NewTemplatePlugin creates a new TemplatePlugin.

func (*TemplatePlugin) HandleEndpoints

func (p *TemplatePlugin) HandleEndpoints(eventType watch.EventType, endpoints *kapi.Endpoints) error

HandleEndpoints processes watch events on the Endpoints resource.

func (*TemplatePlugin) HandleRoute

func (p *TemplatePlugin) HandleRoute(eventType watch.EventType, route *routeapi.Route) error

HandleRoute processes watch events on the Route resource.

Jump to

Keyboard shortcuts

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