route

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extension

func Extension(r *v1.Route) string

Extension extracts extensions in a given route as a pretty printed string

func FromRouteDetail added in v0.2.7

func FromRouteDetail(rd *RouteDetail) (*v1.Route, error)

func FromRouteOption added in v0.2.7

func FromRouteOption(opts *RouteOption, sc storage.Interface) (*v1.Route, error)

func Interactive added in v0.2.7

func Interactive(sc storage.Interface, r *v1.Route) error

Interactive allows user to create/update a route definition interactively

func Matcher

func Matcher(r *v1.Route) (string, string, string, string)

Matcher extracts the parts of the matcher in the given route

func PrintTable

func PrintTable(list []*v1.Route, w io.Writer)

PrintTable prints the list of routes as a table

func SortRoutes added in v0.2.7

func SortRoutes(routes []*v1.Route)

Types

type Destination

type Destination struct {
	Upstream string
	Function string
}

Destination represents a single destination of a route It can be either an upstream or upstream-function pair

func Destinations

func Destinations(r *v1.Route) []Destination

Destinations extracts the list of destinations in a given route

func (*Destination) String

func (d *Destination) String() string

type KubeUpstream added in v0.2.7

type KubeUpstream struct {
	Name      string
	Namespace string
	Port      int
}

type RouteDetail added in v0.2.7

type RouteDetail struct {
	Event         string
	PathExact     string
	PathRegex     string
	PathPrefix    string
	Verb          string
	Headers       string
	Upstream      string
	Function      string
	PrefixRewrite string
	Extensions    string

	Kube *KubeUpstream
}

type RouteOption added in v0.2.7

type RouteOption struct {
	Route          *RouteDetail
	Virtualservice string
	Domain         string
	Filename       string
	Output         string
	Sort           bool
	Interactive    bool
}

type SelectionResult

type SelectionResult struct {
	Selected    []*v1.Route
	NotSelected []*v1.Route
}

SelectionResult groups routes into selected and not selected list

func SelectInteractive

func SelectInteractive(routes []*v1.Route, multi bool) (*SelectionResult, error)

SelectInteractive selectes one or more routes interactively. If multi is true it enables selecting multiple routess

Jump to

Keyboard shortcuts

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