Help us shape the future of Go! Take the 2026 Go Developer Survey

ocproute

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package ocproute exposes a function through an OpenShift Route.

Routes are an OpenShift-only resource, but both binaries attach this Exposer on every platform: on a cluster with no Route API the cost is one List that comes back NotFound. Choosing it is the caller's job: nothing here detects the platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exposer

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

Exposer creates and removes the OpenShift Route fronting a function.

func New

func New(deployerName string) *Exposer

New returns an Exposer stamping its Routes with deployerName, one of the names in pkg/deployers.

func (*Exposer) Expose

func (x *Exposer) Expose(ctx context.Context, client dynamic.Interface, e deployer.Exposure) (string, error)

Expose creates or updates the Route for 'e' and returns the hostname a router admitted it at. A Route this call created that fails admission is removed again; a pre-existing one is kept, it may be serving.

func (*Exposer) Unexpose

func (x *Exposer) Unexpose(ctx context.Context, client dynamic.Interface, ref deployer.ExposureRef) error

Unexpose deletes the Route belonging to the function named by ref, leaving in place any Route this Exposer did not create.

Jump to

Keyboard shortcuts

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