Documentation
¶
Index ¶
- Constants
- func ExtractComputedURL(obj client.Object) (string, error)
- func ExtractDomain(obj client.Object) (string, error)
- func ExtractNgrokTrafficPolicyFromAnnotations(obj client.Object) (string, error)
- func ExtractURL(obj client.Object) (string, error)
- func ExtractUseBindings(obj client.Object) ([]string, error)
- func ExtractUseEndpointPooling(obj client.Object) (bool, error)
- type MappingStrategy
Constants ¶
View Source
const ( // ComputedURLAnnotation is the annotation key for the computed URL of an endpoint. // This is temporarily used by the Service controller to store reserved TCP addresses, // while we work to add support for assigning TCP addresses to Cloud/Agent Endpoints // when their URL is specified as 'tcp://', for example. ComputedURLAnnotation = "k8s.ngrok.com/computed-url" ComputedURLKey = "computed-url" // DeniedKeyName name of the key that contains the reason to deny a location DeniedKeyName = "Denied" // This annotation can be used on services to listen on a specific domain(i.e. a TLS endpoint) // Deprecated: Use the URL annotation instead DomainAnnotation = "k8s.ngrok.com/domain" DomainKey = "domain" // This annotation can be used on ingress/gateway resources to control which ngrok resources (endpoints/edges) get created from it MappingStrategyAnnotation = "k8s.ngrok.com/mapping-strategy" MappingStrategyAnnotationKey = "mapping-strategy" EndpointPoolingAnnotation = "k8s.ngrok.com/pooling-enabled" EndpointPoolingAnnotationKey = "pooling-enabled" // This annotation can be used on a service to control whether the endpoint is a TCP or TLS endpoint. // Examples: // * tcp://1.tcp.ngrok.io:12345 // * tls://my-domain.com // URLAnnotation = "k8s.ngrok.com/url" URLKey = "url" )
Variables ¶
This section is empty.
Functions ¶
func ExtractComputedURL ¶
ExtractComputedURL extracts the computed URL from the annotation "k8s.ngrok.com/computed-url" if it is present. Otherwise, it returns an error.
func ExtractDomain ¶
ExtractDomain extracts the domain from the annotation "k8s.ngrok.com/domain" if it is present. Otherwise, it returns an error.
func ExtractNgrokTrafficPolicyFromAnnotations ¶
Extracts a single traffic policy str from the annotation k8s.ngrok.com/traffic-policy: "module1"
func ExtractURL ¶
Retrieves the value of the annotation "k8s.ngrok.com/url" if it is present. Otherwise, it returns an error.
func ExtractUseBindings ¶
Determines which traffic is allowed to reach an endpoint from the annotation "k8s.ngrok.com/bindings" if it is present. Otherwise, it defaults to public
Types ¶
type MappingStrategy ¶
type MappingStrategy string
const ( // The default strategy when translating resources into AgentEndpoint / CloudEndpoint that prioritizes collapsing into a single public AgentEndpoint when possible MappingStrategy_EndpointsDefault MappingStrategy = "endpoints" // Alternative strategy when translating resources into AgentEndpoint / CloudEndpoint that always creates CloudEndpoints for hostnames and only internal AgentEndpoints for each unique upstream MappingStrategy_EndpointsVerbose MappingStrategy = "endpoints-verbose" )
Click to show internal directories.
Click to hide internal directories.