mapper

package
v0.0.0-...-b7f4efd Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper struct {
	// contains filtered or unexported fields
}

func New

func New(opts Opts) *Mapper

func (*Mapper) Map

func (m *Mapper) Map(apiDefinition *v1alpha1.ApiDefinition, ingress *v1.Ingress) *v1alpha1.ApiDefinition

Map maps an ingress to a graviteeio API definition, adding one virtual host per ingress rule, one endpoint per backend service, and one conditional flow per host and path of the rule. The host header is used to select the flow, and a dynamic routing policy routes the request to the backend service, identified by the endpoint name. Is no rule matches, a 404 response is returned by a flow that negates all the previous conditions.

type Opts

type Opts struct {
	Templates map[int]ResponseTemplate
}

func NewOpts

func NewOpts() Opts

type ResponseTemplate

type ResponseTemplate struct {
	Content     string
	ContentType string
}

Jump to

Keyboard shortcuts

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