resolver

package
v0.0.0-...-42d1b00 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package resolver implements resolvers for resolving k8s references and URIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceHostName

func ServiceHostName(serviceName, namespace string) string

ServiceHostName resolves the hostname for a Kubernetes Service.

Types

type URIResolver

type URIResolver struct {
	// contains filtered or unexported fields
}

URIResolver resolves Destinations and ObjectReferences into a URI.

func NewURIResolver

func NewURIResolver(ctx context.Context, callback func(types.NamespacedName)) *URIResolver

NewURIResolver constructs a new URIResolver with context and a callback for a given listableType (Listable) passed to the URIResolver's tracker.

func (*URIResolver) URIFromDestination

func (r *URIResolver) URIFromDestination(dest duckv1beta1.Destination, parent interface{}) (string, error)

URIFromDestination resolves a v1beta1.Destination into a URI string.

func (*URIResolver) URIFromDestinationV1

func (r *URIResolver) URIFromDestinationV1(dest duckv1.Destination, parent interface{}) (*apis.URL, error)

URIFromDestinationV1 resolves a v1.Destination into a URL.

func (*URIResolver) URIFromKReference

func (r *URIResolver) URIFromKReference(ref *duckv1.KReference, parent interface{}) (*apis.URL, error)

func (*URIResolver) URIFromObjectReference

func (r *URIResolver) URIFromObjectReference(ref *corev1.ObjectReference, parent interface{}) (*apis.URL, error)

URIFromObjectReference resolves an ObjectReference to a URI string.

Jump to

Keyboard shortcuts

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