Documentation ¶
Index ¶
- type HTTPUploader
- func (h *HTTPUploader) UploadChunkedTransfer(dstPathFile string, headers map[string]string) chan []byte
- func (h *HTTPUploader) UploadData(data []byte, dstPathFile string, headers map[string]string) error
- func (h *HTTPUploader) UploadLocalFile(localFilename string, dstPathFile string, headers map[string]string) error
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 ¶
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
Click to show internal directories.
Click to hide internal directories.