httpuploader

package
v0.0.0-...-9d6490e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPUploader

type HTTPUploader struct {
	HTTPClient *http.Client

	Log                     *logrus.Logger
	HTTPSInsecure           bool
	HTTPScheme              string
	HTTPHost                string
	MaxHTTPRetries          int
	InitialHTTPRetryDelayMs int
}

HTTPUploader HTTP uploader class class

func New

func New(log *logrus.Logger, httpsInsecure bool, httpScheme string, httpHost string, maxHTTPRetries int, initialHTTPRetryDelayMs int) HTTPUploader

New Creates a chunk instance

func (*HTTPUploader) UploadChunkedTransfer

func (h *HTTPUploader) UploadChunkedTransfer(dstPathFile string, headers map[string]string) chan []byte

UploadChunkedTransfer Uploads data as soon as arrives to the returned channel (no retries for chunked transfer, future improvement)

func (*HTTPUploader) UploadData

func (h *HTTPUploader) UploadData(data []byte, dstPathFile string, headers map[string]string) error

UploadData Uploads data array

func (*HTTPUploader) UploadLocalFile

func (h *HTTPUploader) UploadLocalFile(localFilename string, dstPathFile string, headers map[string]string) error

UploadLocalFile Uploads a file from the filesystem

Jump to

Keyboard shortcuts

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