Documentation ¶
Index ¶
- Constants
- func MakeRootHTTPProxy(ctx context.Context, options renderers.RenderOptions, ...) (rpv1.OutputResource, error)
- func MakeRoutesHTTPProxies(ctx context.Context, options renderers.RenderOptions, ...) ([]rpv1.OutputResource, error)
- type ErrFQDNOrPrefixRequired
- type ErrNoPublicEndpoint
- type Renderer
Constants ¶
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 ¶
func (r Renderer) Render(ctx context.Context, dm v1.DataModelInterface, options renderers.RenderOptions) (renderers.RendererOutput, error)
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.