remotefile

package
v0.262.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(doer Doer) *Client

func (*Client) Resolve

func (c *Client) Resolve(ctx context.Context, u string) ([]byte, error)

resolve and return the contents of a remote file which can be used later, in the pipeline

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type Resolver

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

TODO: could make this more generic since this is shared with the container resolver

func NewResolver

func NewResolver(ctx context.Context, opts ...ResolverOption) *Resolver

func (*Resolver) Add

func (r *Resolver) Add(url string)

Add a URL to the resolver queue. When called after Finish was called, it may panic.

func (*Resolver) Finish

func (r *Resolver) Finish() ([]Spec, error)

Finish starts collecting of results and returns them. No further calls to Add are allowed after this call. It blocks until all results are collected.

type ResolverOption

type ResolverOption func(*resolverOptions)

func WithDoer

func WithDoer(doer Doer) ResolverOption

type Spec

type Spec struct {
	URL     string
	Content []byte
}

Jump to

Keyboard shortcuts

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