route

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 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 FromDetail added in v0.2.9

func FromDetail(rd *Detail) (*v1.Route, error)

func FromOption added in v0.2.9

func FromOption(opts *Option, 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 Detail added in v0.2.9

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

	Kube *KubeUpstream
}

func ToDetail added in v0.2.9

func ToDetail(r *v1.Route) (*Detail, error)

type KubeUpstream added in v0.2.7

type KubeUpstream struct {
	Name      string
	Namespace string
	Port      int
}

type Option added in v0.2.9

type Option struct {
	Route          *Detail
	Virtualservice string
	Domain         string
	Filename       string
	Output         string
	Sort           bool
	Interactive    bool
	Index          int
}

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