Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDeterministicName ¶
GenerateDeterministicName makes a best-effort attempt to create a unique but reproducible name for use in a Request. The returned value will have the format {prefix}-{hash} where {prefix} is given and {hash} is nameHasher(base) + nameHasher(param1) + nameHasher(param2) + ...
Types ¶
type BasicRequest ¶
type BasicRequest struct {
// contains filtered or unexported fields
}
BasicRequest holds the fields needed to submit a new resource request.
func (*BasicRequest) Name ¶
func (req *BasicRequest) Name() string
Name returns the name attached to the request
func (*BasicRequest) Namespace ¶
func (req *BasicRequest) Namespace() string
Namespace returns the namespace that the request is associated with
func (*BasicRequest) Params ¶
func (req *BasicRequest) Params() v1.Params
Params are the map of parameters associated with this request
type CRDRequester ¶
type CRDRequester struct {
// contains filtered or unexported fields
}
CRDRequester implements the Requester interface using ResolutionRequest CRDs.
func NewCRDRequester ¶
func NewCRDRequester(clientset rrclient.Interface, lister rrlisters.ResolutionRequestLister) *CRDRequester
NewCRDRequester returns an implementation of Requester that uses ResolutionRequest CRD objects to mediate between the caller who wants a resource (e.g. Tekton Pipelines) and the responder who can fetch it (e.g. the gitresolver)
func (*CRDRequester) Submit ¶
func (r *CRDRequester) Submit(ctx context.Context, resolver ResolverName, req Request) (ResolvedResource, error)
Submit constructs a ResolutionRequest object and submits it to the kubernetes cluster, returning any errors experienced while doing so. If ResolutionRequest is succeeded then it returns the resolved data.
type OwnedRequest ¶
type OwnedRequest = common.OwnedRequest
OwnedRequest is implemented by any type implementing Request that also needs to express a Kubernetes OwnerRef relationship as part of the request being made.
type Request ¶
Request is implemented by any type that represents a single request for a remote resource. Implementing this interface gives the underlying type an opportunity to control properties such as whether the name of a request has particular properties, whether the request should be made to a specific namespace, and precisely which parameters should be included.
type Requester ¶
Requester is the interface implemented by a type that knows how to submit requests for remote resources.
type ResolvedResource ¶
type ResolvedResource = common.ResolvedResource
ResolvedResource is implemented by any type that offers a read-only view of the data and metadata of a resolved remote resource.
type ResolverName ¶
type ResolverName = common.ResolverName
ResolverName is the type used for a resolver's name and is mostly used to ensure the function signatures that accept it are clear on the purpose for the given string.