resolution

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

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 []v1beta1.Param) remote.Resolver

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

Types

type DataAccessError added in v0.46.0

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 added in v0.46.0

func (e *DataAccessError) Error() string

Error returns the string representation of this error.

func (*DataAccessError) Is added in v0.46.0

func (*DataAccessError) Is(e error) bool

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

func (*DataAccessError) Unwrap added in v0.46.0

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 added in v0.46.0

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 added in v0.46.0

func (e *InvalidRuntimeObjectError) Error() string

Error returns the string representation of this error.

func (*InvalidRuntimeObjectError) Is added in v0.46.0

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

func (*InvalidRuntimeObjectError) Unwrap added in v0.46.0

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, *v1beta1.ConfigSource, 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