wsnet

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// common
	URLVarPortName      = "{{PORT_NAME}}" // For compatibility
	URLVarNetRuleName   = "{{NETRULE_NAME}}"
	URLVarPortNumber    = "{{PORT_NUMBER}}"
	URLVarNetRuleGroup  = "{{NETRULE_GROUP}}"
	URLVarInstanceName  = "{{INSTANCE}}"
	URLVarWorkspaceName = "{{WORKSPACE}}"
	URLVarNamespace     = "{{NAMESPACE}}"
	URLVarUserName      = "{{USER_NAME}}"

	// for network type LoadBalancer service
	URLVarLoadBalancer = "{{LOAD_BALANCER}}"

	// for network type NodePort service
	URLVarNodePortNumber = "{{NODEPORT_NUMBER}}"
)

Variables

This section is empty.

Functions

func GenerateIngressHost

func GenerateIngressHost(r cosmov1alpha1.NetworkRule, name, namespace string, urlBase URLBase) string

Types

type URLBase

type URLBase string

e.g. http://localhost:{{PORT_NUMBER}} e.g. https://{{NETRULE_NAME}}-{{INSTANCE}}-{{NAMESPACE}}.domain

func (URLBase) GenURL

func (u URLBase) GenURL(v URLVars) string

type URLVars

type URLVars struct {
	NetworkRuleName string
	PortNumber      string
	NetRuleGroup    string

	InstanceName  string
	WorkspaceName string
	UserName      string
	Namespace     string

	NodePortNumber string
	LoadBalancer   string

	IngressPath string
}

func NewURLVars

func NewURLVars(netRule cosmov1alpha1.NetworkRule) URLVars

func (*URLVars) Dump

func (v *URLVars) Dump() []interface{}

Jump to

Keyboard shortcuts

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