Documentation ¶
Overview ¶
Package resolver implements resolvers for resolving k8s references and URIs.
Index ¶
- type AuthenticatableResolver
- type RefResolverFunc
- type URIResolver
- func (r *URIResolver) AddressableFromDestinationV1(ctx context.Context, dest duckv1.Destination, parent interface{}) (*duckv1.Addressable, error)
- func (r *URIResolver) URIFromDestination(ctx context.Context, dest duckv1beta1.Destination, parent interface{}) (string, error)
- func (r *URIResolver) URIFromDestinationV1(ctx context.Context, dest duckv1.Destination, parent interface{}) (*apis.URL, error)
- func (r *URIResolver) URIFromKReference(ctx context.Context, ref *duckv1.KReference, parent interface{}) (*apis.URL, error)
- func (r *URIResolver) URIFromObjectReference(ctx context.Context, ref *corev1.ObjectReference, parent interface{}) (*apis.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticatableResolver ¶
type AuthenticatableResolver struct {
// contains filtered or unexported fields
}
AuthenticatableResolver resolves ObjectReferences into a AuthenticatableType.
func NewAuthenticatableResolverFromTracker ¶
func NewAuthenticatableResolverFromTracker(ctx context.Context, t tracker.Interface) *AuthenticatableResolver
NewAuthenticatableResolverFromTracker constructs a new AuthenticatableResolver with context and a tracker.
func (*AuthenticatableResolver) AuthStatusFromObjectReference ¶
func (r *AuthenticatableResolver) AuthStatusFromObjectReference(ref *corev1.ObjectReference, parent interface{}) (*duckv1.AuthStatus, error)
AuthStatusFromObjectReference returns the AuthStatus from an object
type RefResolverFunc ¶
type RefResolverFunc func(ctx context.Context, ref *corev1.ObjectReference) (bool, *apis.URL, error)
RefResolverFunc resolves ObjectReferences into a URI. It returns true when it handled the reference, in which case it also returns the resolved URI or an error.
type URIResolver ¶
type URIResolver struct {
// contains filtered or unexported fields
}
URIResolver resolves Destinations and ObjectReferences into a URI.
func NewURIResolverFromTracker ¶
func NewURIResolverFromTracker(ctx context.Context, t tracker.Interface, resolvers ...RefResolverFunc) *URIResolver
NewURIResolverFromTracker constructs a new URIResolver with context, a tracker and an optional list of custom resolvers.
func (*URIResolver) AddressableFromDestinationV1 ¶
func (r *URIResolver) AddressableFromDestinationV1(ctx context.Context, dest duckv1.Destination, parent interface{}) (*duckv1.Addressable, error)
AddressableFromDestinationV1 resolves a v1.Destination into a duckv1.Addressable.
func (*URIResolver) URIFromDestination ¶
func (r *URIResolver) URIFromDestination(ctx context.Context, dest duckv1beta1.Destination, parent interface{}) (string, error)
URIFromDestination resolves a v1beta1.Destination into a URI string.
func (*URIResolver) URIFromDestinationV1 ¶
func (r *URIResolver) URIFromDestinationV1(ctx context.Context, dest duckv1.Destination, parent interface{}) (*apis.URL, error)
URIFromDestinationV1 resolves a v1.Destination into a URL.
func (*URIResolver) URIFromKReference ¶
func (r *URIResolver) URIFromKReference(ctx context.Context, ref *duckv1.KReference, parent interface{}) (*apis.URL, error)
func (*URIResolver) URIFromObjectReference ¶
func (r *URIResolver) URIFromObjectReference(ctx context.Context, ref *corev1.ObjectReference, parent interface{}) (*apis.URL, error)
URIFromObjectReference resolves an ObjectReference to a URI string.