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.
Click to show internal directories.
Click to hide internal directories.