modulepackage
6.8.1
Repository: https://github.com/opensciencegrid/stashcp.git
Documentation: pkg.go.dev
# README
Stashcp Go Client
Building
Download the repo and cd into the directory. Build with the command:
$ make
It will make two executables. A static x86 executable, and an executable native to the building machine.
Testing
Run this simple command to download a test file
$ ./stashcp /osgconnect/public/dweitzel/blast/queries/query1 ./
Configuration
stashcp
is affected by the environment variables:
Environment Variable | Description |
---|---|
OSG_DISABLE_PROXY_FALLBACK | Do not disable using proxies. By default, stashcp will try to use an HTTP proxy when connecting to a cache. If this environment variable is set (no value necessary, only if it's set), then stashcp will not fallback to no proxy if the proxy download fails. |
STASHCP_MINIMUM_DOWNLOAD_SPEED | The lower limit a download will be cancelled, in bytes per second |
STASH_NAMESPACE_URL | The URL to download the namespace and cache information. Default: https://topology.opensciencegrid.org/stashcache/namespaces |
# Functions
AddError will add an accumulated error to the error stack.
No description provided by the author
Start the transfer, whether read or write back.
DownloadHTTP - Perform the actual download of the file.
ErrorsRetryable returns if the errors in the stack are retryable later.
Find takes a slice and looks for an element in it.
No description provided by the author
No description provided by the author
GetNamespaces returns the list of namespaces.
HasPort test the host if it includes a port.
No description provided by the author
IsRetryable will return true if the error is retryable.
MatchNamespace matches the namespace passed in to the namespaces in the list.
NewTransferDetails creates the TransferDetails struct with the given cache.
UploadFile Uploads a file using HTTP.
# Variables
CacheOverride.
No description provided by the author
Nearest cache.
List of caches, in order from closest to furthest.
No description provided by the author
# Structs
Cache.
ConnectionSetupError is an error that is returned when a connection to the remote server fails.
Namespace holds the structure of stash namespaces.
No description provided by the author
No description provided by the author
ProgressReader wraps the io.Reader to get progress Adapted from https://stackoverflow.com/questions/26050380/go-tracking-post-request-progress.
SlowTransferError is an error that is returned when a transfer takes longer than the configured timeout.
No description provided by the author
No description provided by the author