route

package
v0.0.0-...-983ef91 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// Route definition. Used to create a route object
	Definition *routev1.Route
	// Created route object
	Object *routev1.Route
	// contains filtered or unexported fields
}

Builder provides struct for route object containing connection to the cluster and the route definitions.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, nsname, serviceName string) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull loads existing route from cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create makes a route according to the route definition and stores the created object in the route builder.

func (*Builder) Delete

func (builder *Builder) Delete() (*Builder, error)

Delete removes the route object and resets the builder object.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given route exists.

func (*Builder) Get

func (builder *Builder) Get() (*routev1.Route, error)

Get returns route object if found.

func (*Builder) WithTargetPortName

func (builder *Builder) WithTargetPortName(portName string) *Builder

WithTargetPortName adds a target port to the route by name.

func (*Builder) WithTargetPortNumber

func (builder *Builder) WithTargetPortNumber(port int32) *Builder

WithTargetPortNumber adds a target port to the route by number.

func (*Builder) WithWildCardPolicy

func (builder *Builder) WithWildCardPolicy(wildcardPolicy string) *Builder

WithWildCardPolicy adds the specified wildCardPolicy to the route.

Jump to

Keyboard shortcuts

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