Categorygithub.com/opensciencegrid/stashcp/v6
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 VariableDescription
OSG_DISABLE_PROXY_FALLBACKDo 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_SPEEDThe lower limit a download will be cancelled, in bytes per second
STASH_NAMESPACE_URLThe URL to download the namespace and cache information. Default: https://topology.opensciencegrid.org/stashcache/namespaces

# Packages

No description provided by the author
No description provided by the author

# 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