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)
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.
func (*SimpleAllocationPlugin) GenerateHostname ¶
func (p *SimpleAllocationPlugin) GenerateHostname(route *routeapi.Route, shard *routeapi.RouterShard) string
Generate a host name for a route - using the service name, namespace (if provided) and the router shard dns suffix.
Click to show internal directories.
Click to hide internal directories.