Documentation ¶
Overview ¶
Package ingressutil provides utilities for building a kubernetes ingress controller
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
Types ¶
type IngressRouter ¶
type IngressRouter interface { // MatchRequest matches an HTTP Request to the namespace, service and upstream address with port to forward the HTTP request to. MatchRequest(r *http.Request) (namespace, name, addr string, found bool) // StartAutoUpdate starts listening to kube for updates. It returns a function which can be called to block until all ingresses have been read StartAutoUpdate(ctx context.Context, kubeClient *kubernetes.Clientset) (waitTillReady func()) }
IngressRouter monitors updates to kube ingresses, and maintains a routing table based on hostname and path. NOTE: This does not currently support wildcard domains, or regex in paths
func NewIngressRouter ¶
func NewIngressRouter() IngressRouter
NewIngressRouter is used to create an IngressRouter
type IngressRouterStub ¶
IngressRouterStub can be used to create an ingress router for tests or local dev. It simply returns the fields in it's properties
func (*IngressRouterStub) MatchRequest ¶
func (*IngressRouterStub) StartAutoUpdate ¶
func (ir *IngressRouterStub) StartAutoUpdate(ctx context.Context, kubeClient *kubernetes.Clientset) func()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.