Documentation
¶
Overview ¶
Package embedded transfers the contents of an OCM embedded share (an RO-Crate JSON payload listing plain or Zenodo files) to a WebDAV destination, streaming each referenced file in the background.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewFuncs = map[string]NewFunc{}
NewFuncs holds the registered embedded-transfer drivers.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// WebDAVURL is the destination WebDAV endpoint files are uploaded to.
WebDAVURL string `mapstructure:"webdav_url"`
// Timeout is the per-file ceiling, in seconds.
Timeout int `mapstructure:"embedded_transfer_timeout"`
// IdleTimeout, in seconds, aborts a file attempt if no bytes flow for that long.
IdleTimeout int `mapstructure:"embedded_transfer_idle_timeout"`
// Retries is the number of attempts per file (1 = no retry).
Retries int `mapstructure:"embedded_transfer_retries"`
}
Config holds the settings for transferring embedded share payloads.
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills in sensible defaults for any unset setting.
type Transferrer ¶
Transferrer processes an embedded share payload, transferring its referenced files to a destination. Drivers register an implementation via Register.
Click to show internal directories.
Click to hide internal directories.