http

package
v0.0.0-...-15d82a0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const NoSuitableAddrStr string = "no suitable address found"

NoSuitableAddrStr - the string to be used for checking the error message Since the golang net package does not export this, we have to define it here again

Variables

This section is empty.

Functions

func IsNoSuitableAddrErr

func IsNoSuitableAddrErr(err error) bool

IsNoSuitableAddrErr - the function to check 'no suitable address' for http mainly

Types

type Resp

type Resp struct {
	List          []string //list of images at given path
	BodyLength    int      // Body length in http response
	ContentLength int64    // Content length in http response
}

Resp response data from executing commands

func ExecCmd

func ExecCmd(ctx context.Context, cmd, host, remoteFile, localFile string, objSize int64,
	prgNotify types.StatsNotifChan, client *http.Client) (types.UpdateStats, Resp)

ExecCmd performs various commands such as "ls", "get", etc. Note that "host" needs to contain the URL in the case of a get

Jump to

Keyboard shortcuts

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