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