gateway

package
v0.35.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceType = "Applications.Core/gateways"
)

Variables

This section is empty.

Functions

func MakeRootHTTPProxy

func MakeRootHTTPProxy(ctx context.Context, options renderers.RenderOptions, gateway *datamodel.Gateway, resourceName string, applicationName string, hostname string) (rpv1.OutputResource, error)

MakeRootHTTPProxy validates the Gateway resource and its dependencies, and creates a Contour HTTPProxy resource to act as the Gateway.

func MakeRoutesHTTPProxies

func MakeRoutesHTTPProxies(ctx context.Context, options renderers.RenderOptions, resource datamodel.Gateway, gateway *datamodel.GatewayProperties, gatewayName string, gatewayOutPutResource rpv1.OutputResource, applicationName string) ([]rpv1.OutputResource, error)

MakeRoutesHTTPProxies creates HTTPProxy objects for each route in the gateway and returns them as OutputResources. It returns an error if it fails to get the route name.

Types

type ErrFQDNOrPrefixRequired

type ErrFQDNOrPrefixRequired struct {
}

func (*ErrFQDNOrPrefixRequired) Error

func (e *ErrFQDNOrPrefixRequired) Error() string

Error returns the error string for when either a prefix or fully qualified hostname is not provided.

func (*ErrFQDNOrPrefixRequired) Is

func (e *ErrFQDNOrPrefixRequired) Is(target error) bool

Is checks if the target error is of the same type as the ErrFQDNOrPrefixRequired error.

type ErrNoPublicEndpoint

type ErrNoPublicEndpoint struct {
}

func (*ErrNoPublicEndpoint) Error

func (e *ErrNoPublicEndpoint) Error() string

Error returns an error string when there is no public endpoint available.

func (*ErrNoPublicEndpoint) Is

func (e *ErrNoPublicEndpoint) Is(target error) bool

Is checks if the target error is of type ErrNoPublicEndpoint.

type Renderer

type Renderer struct {
}

func (Renderer) GetDependencyIDs

func (r Renderer) GetDependencyIDs(ctx context.Context, dm v1.DataModelInterface) (radiusResourceIDs []resources.ID, azureResourceIDs []resources.ID, err error)

GetDependencyIDs parses the gateway data model to get the secretStore resource ID from the certificateFrom property, and returns them as two slices of resource IDs.

func (Renderer) Render

Render creates a gateway object and http route objects based on the given parameters, and returns them along with a computed value for the gateway's public endpoint.

Jump to

Keyboard shortcuts

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