config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Route controller depends.

Index

Constants

View Source
const (
	DomainConfigName = "config-domain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	// Domains map from domain to label selector.  If a route has
	// labels matching a particular selector, it will use the
	// corresponding domain.  If multiple selectors match, we choose
	// the most specific selector.
	Domains map[string]*LabelSelector
}

Domain maps domains to routes by matching the domain's label selectors to the route's labels.

func NewDomainFromConfigMap

func NewDomainFromConfigMap(configMap *corev1.ConfigMap) (*Domain, error)

NewDomainFromConfigMap creates a Domain from the supplied ConfigMap

func (*Domain) LookupDomainForLabels

func (c *Domain) LookupDomainForLabels(labels map[string]string) string

LookupDomainForLabels returns a domain given a set of labels. Since we reject configuration without a default domain, this should always return a value.

type LabelSelector

type LabelSelector struct {
	Selector map[string]string `json:"selector,omitempty"`
}

LabelSelector represents map of {key,value} pairs. A single {key,value} in the map is equivalent to a requirement key == value. The requirements are ANDed.

func (*LabelSelector) Matches

func (s *LabelSelector) Matches(labels map[string]string) bool

Matches returns whether the given labels meet the requirement of the selector.

Jump to

Keyboard shortcuts

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