simple

package
v3.8.0-0.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 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. 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