simple

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Overview

Package simple contains the SimpleAllocation route plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleAllocationPlugin

type SimpleAllocationPlugin struct {
	DNSSuffix string
}

SimpleAllocationPlugin implements the route.AllocationPlugin interface to provide a simple unsharded (or single sharded) allocation plugin.

func NewSimpleAllocationPlugin

func NewSimpleAllocationPlugin(suffix string) (*SimpleAllocationPlugin, error)

NewSimpleAllocationPlugin creates a new SimpleAllocationPlugin.

func (*SimpleAllocationPlugin) Allocate

Allocate a router shard for the given route. This plugin always returns the "global" router shard.

func (*SimpleAllocationPlugin) GenerateHostname

func (p *SimpleAllocationPlugin) GenerateHostname(route *routeapi.Route, shard *routeapi.RouterShard) string

GenerateHostname generates a host name for a route - using the service name, namespace (if provided) and the router shard dns suffix.

Jump to

Keyboard shortcuts

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