io.systemd.Import¶
| Property | Value |
|---|---|
| Go package | github.com/rossedman/sdvarlink/systemd/latest/importd |
| Socket | /run/systemd/io.systemd.Import |
| Available since | systemd v257 |
| Methods · types · errors | 2 · 5 · 4 |
Methods¶
ListTransfers¶
streaming (requires more)
List ongoing transfers, or query details about specific transfers
func (c *Client) ListTransfers(ctx context.Context, in ListTransfersIn) iter.Seq2[*ListTransfersOut, error]
Parameters
| Field | Type | Description |
|---|---|---|
class |
?ImageClass |
Image class to filter by |
Reply
| Field | Type | Description |
|---|---|---|
id |
int |
A unique numeric identifier for the ongoing transfer |
type |
TransferType |
The type of transfer |
remote |
string |
The remote URL |
local |
string |
The local image name |
class |
ImageClass |
The class of the image |
percent |
float |
Progress in percent |
Pull¶
streaming optional
Download a .tar or .raw file. This must be called with the 'more' flag enabled. It will immediately return the numeric ID of the transfer, and then follow up with progress and log message updates, until the transfer is complete.
func (c *Client) Pull(ctx context.Context, in PullIn) (*PullOut, error)
func (c *Client) PullMore(ctx context.Context, in PullIn) iter.Seq2[*PullOut, error]
Parameters
| Field | Type | Description |
|---|---|---|
remote |
string |
The remote URL to download from |
local |
?string |
The local image name to download to |
type |
RemoteType |
The type of the resource |
class |
ImageClass |
The image class |
verify |
?ImageVerify |
The whether and how thoroughly to verify the download before installing it locally. Defaults to 'signature'. |
force |
?bool |
If true, an existing image by the local name is deleted. Defaults to false. |
readOnly |
?bool |
Whether to make the image read-only after downloading. Defaults ot false. |
keepDownload |
?bool |
Whether to keep a pristine copy of the download separate from the locally installed image. Defaults to false. |
imageRoot |
?string |
Root directory for images. If not specified derived from the image class, and located below /var/lib/. |
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
Reply
| Field | Type | Description |
|---|---|---|
progress |
?float |
A progress update, as percent value |
log |
?LogMessage |
A log message about the ongoing transfer |
id |
?int |
The numeric ID of this download |
Types¶
ImageClass¶
Describes the class of images
| Value | Description |
|---|---|
machine |
An image to boot as a system on baremetal, in a VM or as a container |
portable |
An portable service image |
sysext |
A system extension image |
confext |
A configuration extension image |
RemoteType¶
Describes the type of a images to transfer
| Value | Description |
|---|---|
raw |
Raw binary disk images, typically in a GPT envelope |
tar |
A tarball, optionally compressed |
TransferType¶
Describes the type of a transfer
| Value | Description |
|---|---|
import_tar |
A local import of a tarball |
import_raw |
A local import of a raw disk image |
import_fs |
A local import of a file system tree |
export_tar |
A local export of a tarball |
export_raw |
A local export of a raw disk image |
pull_tar |
A download of a tarball |
pull_raw |
A download of a raw disk image |
ImageVerify¶
Describes whether and how thoroughly to verify the download before installing it locally
| Value | Description |
|---|---|
no |
No verification |
checksum |
Verify that downloads match checksum file (SHA256SUMS), but do not check signature of checksum file |
signature |
Verify that downloads match checksum file (SHA256SUMS), and check signature of checksum file. |
LogMessage¶
Structure for log messages associated with a transfer operation
| Field | Type | Description |
|---|---|---|
message |
string |
The log message |
priority |
int |
The priority of the log message, using the BSD syslog priority levels |
Errors¶
| Error | Go type | Description |
|---|---|---|
AlreadyInProgress |
AlreadyInProgressError |
A transfer for the specified file is already ongoing |
TransferCancelled |
TransferCancelledError |
The transfer has been cancelled on user request |
TransferFailed |
TransferFailedError |
The transfer failed |
NoTransfers |
NoTransfersError |
No currently ongoing transfer |