Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NopObserver ¶
type NopObserver struct{}
NopObserver is a no-op ProgressObserver. Use it instead of nil to avoid nil checks throughout the call chain.
func (NopObserver) Start ¶
func (NopObserver) Start(ProgressInfo) ProgressTracker
type NopTracker ¶
type NopTracker struct{}
NopTracker is a no-op ProgressTracker returned by NopObserver.
func (NopTracker) Add ¶
func (NopTracker) Add(int64)
func (NopTracker) Done ¶
func (NopTracker) Done(error)
type Option ¶
type Option func(*downloadOptions)
func WithProgress ¶
func WithProgress(kind SourceKind, progress ProgressObserver) Option
type ProgressInfo ¶
type ProgressInfo struct {
Kind SourceKind
URL string
TotalBytes int64
}
type ProgressObserver ¶
type ProgressObserver interface {
Start(info ProgressInfo) ProgressTracker
}
type ProgressTracker ¶
type SourceKind ¶
type SourceKind string
const ( SourceRemoteConfig SourceKind = "remote config" SourceRemoteMixin SourceKind = "remote mixin" SourceSelfUpdate SourceKind = "self update" )
Click to show internal directories.
Click to hide internal directories.