resolution

package
v0.0.0-...-4fc8c9b Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilResource is returned when remote resolution
	// appears to have succeeded but the resolved resource is nil.
	ErrNilResource = errors.New("unknown error occurred: requested resource is nil")

	// ErrorRequestedResourceIsNil is a deprecated alias for ErrNilResource and will
	// be removed in a future release.
	//
	// Deprecated: use ErrNilResource instead.
	ErrorRequestedResourceIsNil = ErrNilResource
)

Functions

func NewResolver

func NewResolver(requester remoteresource.Requester, owner kmeta.OwnerRefable, resolverName string, targetName string, targetNamespace string, params v1.Params) remote.Resolver

NewResolver returns an implementation of remote.Resolver capable of performing asynchronous remote resolution.

Types

type DataAccessError

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

DataAccessError is returned when remote resolution succeeded but attempting to access the resolved data failed. An example of this type of error would be if a ResolutionRequest contained malformed base64.

func (*DataAccessError) Error

func (e *DataAccessError) Error() string

Error returns the string representation of this error.

func (*DataAccessError) Is

func (e *DataAccessError) Is(that error) bool

Is returns true if the given error coerces into an error of this type.

func (*DataAccessError) Unwrap

func (e *DataAccessError) Unwrap() error

Unwrap returns the underlying original error.

type ErrorAccessingData deprecated

type ErrorAccessingData = DataAccessError

ErrorAccessingData is an alias to DataAccessError

Deprecated: use DataAccessError instead.

type ErrorInvalidRuntimeObject deprecated

type ErrorInvalidRuntimeObject = InvalidRuntimeObjectError

ErrorInvalidRuntimeObject is an alias to InvalidRuntimeObjectError.

Deprecated: use InvalidRuntimeObjectError instead.

type InvalidRuntimeObjectError

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

InvalidRuntimeObjectError is returned when remote resolution succeeded but the returned data is not a valid runtime.Object.

func (*InvalidRuntimeObjectError) Error

func (e *InvalidRuntimeObjectError) Error() string

Error returns the string representation of this error.

func (*InvalidRuntimeObjectError) Is

func (e *InvalidRuntimeObjectError) Is(that error) bool

Is returns true if the given error coerces into an error of this type.

func (*InvalidRuntimeObjectError) Unwrap

func (e *InvalidRuntimeObjectError) Unwrap() error

Unwrap returns the underlying original error.

type Resolver

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

Resolver implements remote.Resolver and encapsulates the majority of code required to interface with the tektoncd/resolution project. It is used to make async requests for resources like pipelines from remote places like git repos.

func (*Resolver) Get

func (resolver *Resolver) Get(ctx context.Context, _, _ string) (runtime.Object, *v1.RefSource, error)

Get implements remote.Resolver.

func (*Resolver) List

func (resolver *Resolver) List(_ context.Context) ([]remote.ResolvedObject, error)

List implements remote.Resolver but is unused for remote resolution.

Jump to

Keyboard shortcuts

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