Skip to content

vendvahk/go-multipass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-multipass client

Golang client SDK to interact with canonical's multipass.

To launch an instance

instance, err := multipass.LaunchV2(&multipass.LaunchReqV2{
    CPUS:           2,
    Name: "instanceName", 
})
if err != nil {
    t.Fatal(err)
}

To delete an instance

if err := multipass.Delete(&multipass.DeleteRequest{Name:instance.Name}); err != nil {
    t.Fatal(err)
}

To get information an instance

instanceInfo, err := multipass.Info(&multipass.InfoRequest{Name:instance.Name})
if err != nil {
    t.Fatal(err)
}

To execute remote commands

err = multipass.Exec(&multipass.ExecRequest{Name:instanceInfo.Name, Command:"ls"})
if err != nil {
    t.Fatal(err)
}

Roadmap

  • Cover all the commandline parameters of multipass
  • More documentation and examples to be added

About

Go SDK for canonical's multipass - https://debarshibasak.github.io/go-multipass/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 91.3%
  • Shell 7.2%
  • Makefile 1.5%