simple

package
v0.0.0-...-d3d374b Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 4 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. TODO: replace with per router allocation

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. TODO: move to router code, and have the routers set this back on the route status.

Jump to

Keyboard shortcuts

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