progresslog

package
v1.5.2-dev Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UploadParams

func UploadParams(ul *UploadLogger) *soap.Upload

UploadParams uses default upload settings as initial input and set UploadLogger as a logger.

Types

type UploadLogger

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

UploadLogger is used to track upload progress to ESXi/VC of a specific file.

func NewUploadLogger

func NewUploadLogger(logTo func(format string, args ...interface{}),
	filename string, progressInterval time.Duration) *UploadLogger

NewUploadLogger returns a new instance of UploadLogger. User can provide a logger interface that will be used to dump output of the current upload status.

func (*UploadLogger) Sink

func (ul *UploadLogger) Sink() chan<- progress.Report

Sink returns a channel that receives current upload progress status. Channel has to be closed by the caller.

func (*UploadLogger) Wait

func (ul *UploadLogger) Wait()

Wait waits for Sink to complete its work, due to its async nature logging messages may be not sequential.

Jump to

Keyboard shortcuts

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