Documentation ¶
Index ¶
- func NeedUseDragonfly(req *http.Request) bool
- func New(options ...Option) http.RoundTripper
- type Option
- func WithCondition(c func(r *http.Request) bool) Option
- func WithDefaultApplication(b string) Option
- func WithDefaultFilter(f string) Option
- func WithDefaultPriority(p commonv1.Priority) Option
- func WithDefaultTag(b string) Option
- func WithDumpHTTPContent(b bool) Option
- func WithPeerIDGenerator(peerIDGenerator peer.IDGenerator) Option
- func WithPeerSearcher(peerSearcher pex.PeerSearchBroadcaster) Option
- func WithPeerTaskManager(peerTaskManager peer.TaskManager) Option
- func WithTLS(cfg *tls.Config) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeedUseDragonfly ¶
NeedUseDragonfly is the default value for shouldUseDragonfly, which downloads all images layers with dragonfly.
func New ¶
func New(options ...Option) http.RoundTripper
New constructs a new instance of a RoundTripper with additional options.
Types ¶
type Option ¶
type Option func(rt *transport) *transport
Option is functional config for transport.
func WithCondition ¶
WithCondition configures how to decide whether to use dragonfly or not.
func WithDefaultApplication ¶ added in v2.0.6
WithDefaultApplication sets default Application for http requests with X-Dragonfly-Application Header
func WithDefaultFilter ¶
WithDefaultFilter sets default filter for http requests with X-Dragonfly-Filter Header
func WithDefaultPriority ¶ added in v2.0.9
WithDefaultPriority sets default Priority for http requests with X-Dragonfly-Priority Header
func WithDefaultTag ¶ added in v2.0.5
WithDefaultTag sets default tag for http requests with X-Dragonfly-Tag Header
func WithDumpHTTPContent ¶ added in v2.0.1
func WithPeerIDGenerator ¶ added in v2.0.2
func WithPeerIDGenerator(peerIDGenerator peer.IDGenerator) Option
WithPeerIDGenerator sets the peerIDGenerator for transport
func WithPeerSearcher ¶ added in v2.1.40
func WithPeerSearcher(peerSearcher pex.PeerSearchBroadcaster) Option
func WithPeerTaskManager ¶
func WithPeerTaskManager(peerTaskManager peer.TaskManager) Option
WithPeerTaskManager sets the peerTaskManager for transport