progresslog

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

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