Documentation ¶
Index ¶
- type Client
- func (client *Client) ChangeKernelArguments(toAdd []string, toRemove []string) error
- func (client *Client) ChangePackages(toAdd []string, toRemove []string) error
- func (client *Client) OverrideRemove(toRemove []string, toInstall []string) error
- func (client *Client) OverrideReset(toReset []string, toUninstall []string) error
- func (client *Client) QueryPreviousDeploymentError() (*string, error)
- func (client *Client) QueryStatus() (*Status, error)
- func (client *Client) RebaseToContainerImage(target reference.Reference) error
- func (client *Client) RebaseToContainerImageAllowUnsigned(target reference.Reference) error
- func (client *Client) RemovePendingDeployment() error
- func (client *Client) RemoveRollbackDeployment() error
- func (client *Client) RpmOstreeVersion() (*VersionData, error)
- func (client *Client) RpmOstreeVersionEqualOrGreater(required string) (bool, error)
- type Deployment
- type Status
- type VersionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a handle for interacting with an rpm-ostree based system.
func NewClient ¶
NewClient creates a new rpm-ostree client. The client identifier should be a short, unique and ideally machine-readable string. This could be as simple as `examplecorp-management-agent`. If you want to be more verbose, you could use a URL, e.g. `https://gitlab.com/examplecorp/management-agent`.
func (*Client) ChangeKernelArguments ¶
ChangeKernelArguments adjusts the kernel arguments.
func (*Client) ChangePackages ¶
ChangePackages installs or removes packages.
func (*Client) OverrideRemove ¶
OverrideRemove uninstalls base packages, optionally installing new ones at the same time.
func (*Client) OverrideReset ¶
OverrideRemove drops overrides, optionally uninstalling new ones at the same time.
func (*Client) QueryPreviousDeploymentError ¶
QueryPreviousDeploymentError searches from an error message
func (*Client) QueryStatus ¶
QueryStatus loads the current system state.
func (*Client) RebaseToContainerImage ¶
RebaseToContainerImage switches to the target container image
func (*Client) RebaseToContainerImageAllowUnsigned ¶
RebaseToContainerImageAllowUnsigned switches to the target container image, ignoring lack of image signatures.
func (*Client) RemovePendingDeployment ¶
Remove the pending deployment.
func (*Client) RemoveRollbackDeployment ¶
Remove the rollback deployment.
func (*Client) RpmOstreeVersion ¶
func (client *Client) RpmOstreeVersion() (*VersionData, error)
RpmOstreeVersion returns the running rpm-ostree version number
type Deployment ¶
type Deployment struct { ID string `json:"id"` OSName string `json:"osname"` Serial int32 `json:"serial"` BaseChecksum *string `json:"base-checksum"` Checksum string `json:"checksum"` Version string `json:"version"` Timestamp uint64 `json:"timestamp"` Booted bool `json:"booted"` Pinned bool `json:"pinned"` RegenerateInitramfs bool `json:"regenerate-initramfs"` Staged bool `json:"staged"` LiveReplaced string `json:"live-replaced,omitempty"` Origin string `json:"origin"` CustomOrigin []string `json:"custom-origin"` ContainerImageReference string `json:"container-image-reference"` ContainerImageReferenceDigest string `json:"container-image-reference-digest"` Packages []string `json:"packages"` RequestedPackages []string `json:"requested-packages"` RequestedLocalPackages []string `json:"requested-local-packages"` RequestedBaseRemovals []string `json:"requested-base-removals"` RequestedBaseLocalReplacements []interface{} `json:"requested-base-local-replacements"` RequestedLocalFileOverridePackages []string `json:"requested-local-file-override-packages"` BaseLocalReplacements []interface{} `json:"base-local-replacements"` Unlocked string `json:"unlocked"` BaseCommitMeta map[string]interface{} `json:"base-commit-meta"` }
Deployment represents a bootable filesystem tree
func (*Deployment) GetBaseChecksum ¶
func (s *Deployment) GetBaseChecksum() string
GetBaseChecksum returns the ostree commit used as a base.
func (*Deployment) RequireContainerImage ¶
func (d *Deployment) RequireContainerImage() (*imgref.OstreeImageReference, error)
Parse the deployment's container image reference.
type Status ¶
type Status struct { // Deployments is the list of bootable filesystem trees. Deployments []Deployment // Transaction is the active transaction, if any. Transaction *[]string }
Status summarizes the current worldview of the rpm-ostree daemon. The deployment list is the primary data.
func (*Status) GetBootedDeployment ¶
func (s *Status) GetBootedDeployment() (*Deployment, error)
GetBootedDeployment finds the booted deployment, or returns an error if none is found.
func (*Status) GetRollbackDeployment ¶
func (s *Status) GetRollbackDeployment() *Deployment
GetRollbackDeployment finds the rollback deployment, or returns nil if none is found.
func (*Status) GetStagedDeployment ¶
func (s *Status) GetStagedDeployment() *Deployment
GetStagedDeployment finds the staged deployment, or returns nil if none is found.
type VersionData ¶
type VersionData struct { Version string `yaml:"Version"` Features []string `yaml:"Features"` Git string `yaml:"Git"` }
VersionData represents the static information about rpm-ostree.