Documentation ¶
Overview ¶
Package domains holds simple functions for generating domains.
Index ¶
- Constants
- Variables
- func DomainNameFromTemplate(ctx context.Context, r metav1.ObjectMeta, name string) (string, error)
- func GetAllDomainsAndTags(ctx context.Context, r *v1.Route, names []string, ...) (map[string]string, error)
- func GetDomainsForVisibility(ctx context.Context, targetName string, r *v1.Route, ...) (sets.Set[string], error)
- func HostnameFromTemplate(ctx context.Context, name, tag string) (string, error)
- func IsClusterLocal(domain string) bool
- func URL(scheme, fqdn string) *apis.URL
Constants ¶
const HTTPScheme string = "http"
HTTPScheme is the string representation of http.
Variables ¶
var (
ErrorDomainName = errors.New("domain name error")
)
Functions ¶
func DomainNameFromTemplate ¶
DomainNameFromTemplate generates domain name base on the template specified in the `config-network` ConfigMap. name is the "subdomain" which will be referred as the "name" in the template
func GetAllDomainsAndTags ¶ added in v0.7.0
func GetAllDomainsAndTags(ctx context.Context, r *v1.Route, names []string, visibility map[string]netv1alpha1.IngressVisibility) (map[string]string, error)
GetAllDomainsAndTags returns all of the domains and tags(including subdomains) associated with a Route
func GetDomainsForVisibility ¶ added in v0.41.0
func GetDomainsForVisibility(ctx context.Context, targetName string, r *v1.Route, visibility netv1alpha1.IngressVisibility) (sets.Set[string], error)
GetDomainsForVisibility return all domains for the specified visibility.
func HostnameFromTemplate ¶ added in v0.7.0
HostnameFromTemplate generates domain name base on the template specified in the `config-network` ConfigMap. name is the "subdomain" which will be referred as the "name" in the template
func IsClusterLocal ¶ added in v0.8.0
IsClusterLocal checks if a domain is only visible with cluster.
Types ¶
This section is empty.