package progress
import "github.com/vmware/govmomi/vim25/progress"
Index ¶
- func NewReader(ctx context.Context, s Sinker, r io.Reader, size int64) *reader
- type Aggregator
- func NewAggregator(s Sinker) *Aggregator
- func (a *Aggregator) Done()
- func (a *Aggregator) Sink() chan<- Report
- type LogFunc
- type ProgressLogger
- func NewProgressLogger(log LogFunc, prefix string) *ProgressLogger
- func (p *ProgressLogger) Sink() chan<- Report
- func (p *ProgressLogger) Wait()
- type Report
- type SinkFunc
- type Sinker
Functions ¶
func NewReader ¶
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func NewAggregator ¶
func NewAggregator(s Sinker) *Aggregator
func (*Aggregator) Done ¶
func (a *Aggregator) Done()
Done marks the aggregator as done. No more calls to Sink() may be made and the downstream progress report channel will be closed when Done() returns.
func (*Aggregator) Sink ¶
func (a *Aggregator) Sink() chan<- Report
type LogFunc ¶
type ProgressLogger ¶
type ProgressLogger struct {
// contains filtered or unexported fields
}
func NewProgressLogger ¶
func NewProgressLogger(log LogFunc, prefix string) *ProgressLogger
func (*ProgressLogger) Sink ¶
func (p *ProgressLogger) Sink() chan<- Report
func (*ProgressLogger) Wait ¶
func (p *ProgressLogger) Wait()
type Report ¶
Report defines the interface for types that can deliver progress reports. Examples include uploads/downloads in the http client and the task info field in the task managed object.
type SinkFunc ¶
type SinkFunc func() chan<- Report
SinkFunc defines a function that returns a progress report channel.
func (SinkFunc) Sink ¶
Sink makes the SinkFunc implement the Sinker interface.
type Sinker ¶
type Sinker interface { Sink() chan<- Report }
Sinker defines what is expected of a type that can act as a sink for progress reports. The semantics are as follows. If you call Sink(), you are responsible for closing the returned channel. Closing this channel means that the related task is done, or resulted in error.
func Prefix ¶
func Scale ¶
func Tee ¶
Tee works like Unix tee; it forwards all progress reports it receives to the specified sinks
Source Files ¶
aggregator.go doc.go loger.go prefix.go reader.go report.go scale.go sinker.go tee.go
- Version
- v0.48.1 (latest)
- Published
- Feb 11, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 2 months ago –
Tools for package owners.