Struct inapi::Package [] [src]

pub struct Package { /* fields omitted */ }

Primitive for installing and managing software packages.

Examples

Initialise a new Host:

let mut host = Host::connect("hosts/myhost.json").unwrap();

Now let's install a package on our host (picked Nginx at random):

let mut package = Package::new(&mut host, "nginx", None).unwrap();
package.install(&mut host);

You can also specify a package provider manually, instead of relying on Intecture to choose one for you. This is useful if you have multiple providers on your managed host.

let mut package = Package::new(&mut host, "nginx", Some(Providers::Homebrew)).unwrap();
package.install(&mut host);

Methods

impl Package
[src]

[src]

Create a new Package.

[src]

Check if the package is installed.

[src]

Install the package.

[src]

Uninstall the package.