routes

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Domain string
	Path   string
}

func FromIngress

func FromIngress(ingress networkingv1.Ingress) (*Route, error)

FromIngress returns a Route resource matching the given Ingress NOTE: Epinio doesn't create Ingresses with multiple rules. For that reason, this function will try to construct a Route from the first rule of the passed Ingress, ingoring all other rules if they exist.

func FromString

func FromString(routeStr string) Route

FromString converts a route string to a Route object. E.g. mydomain.org/api becomes: Route{ Domain: "mydomain.org", Path: "/api" }

func (Route) String

func (r Route) String() string

String returns the string representation of a Route object. E.g. Route{ Domain: "mydomain.org", Path: "/api" } becomes: "mydomain.org/api" also removes trailing "/". E.g. Route{ Domain: "mydomain.org", Path: "/" } becomes: "mydomain.org" (no trailing "/")

func (Route) ToIngress

func (r Route) ToIngress(ingressName string) networkingv1.Ingress

ToIngress returns an Ingress resource for this route

Jump to

Keyboard shortcuts

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