Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeedUseGetter ¶ added in v1.0.0
needUseGetter is the default value for ShouldUseDfget, which downloads all images layers with dfget.
Types ¶
type DFRoundTripper ¶
type DFRoundTripper struct { Round *http.Transport Round2 http.RoundTripper ShouldUseDfget func(req *http.Request) bool Downloader downloader.Interface StreamDownloader downloader.Stream // contains filtered or unexported fields }
DFRoundTripper implements RoundTripper for dfget. It uses http.fileTransport to serve requests that need to use dfget, and uses http.Transport to serve the other requests.
func New ¶
func New(opts ...Option) (*DFRoundTripper, error)
New returns the default DFRoundTripper.
type Option ¶ added in v0.4.0
type Option func(rt *DFRoundTripper) error
Option is functional config for DFRoundTripper.
func WithCondition ¶ added in v0.4.0
WithCondition configures how to decide whether to use dfget or not.
func WithDownloader ¶ added in v0.4.0
func WithDownloader(d downloader.Interface) Option
WithDownloader sets the downloader for the roundTripper.
func WithStreamDownloader ¶ added in v1.0.1
func WithStreamDownloader(d downloader.Stream) Option
func WithStreamMode ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.