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 ¶
func (p *SimpleAllocationPlugin) Allocate(route *routeapi.Route) (*routeapi.RouterShard, error)
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.
Click to show internal directories.
Click to hide internal directories.