nesting

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 2 Imported by: 0

README

nesting

nesting is a basic and opinionated daemon that sits in front of virtualization platforms.

Its goal is to provide a client/server model for listing, creating and deleting pre-configured Virtual Machines intended for isolated and short-lived workloads.

Platforms supported

MacOS Host
  • Tart (m1; supporting version 0.31.0 and newer)
  • Parallels (intel)

Usage

CLI
$ ./nesting --help
serve
  -config string
        config
  -hypervisor string
        hypervisor (default "parallels")
init
  -config string
        config
shutdown
create <image name>
delete <image id>
list 
Client example
import (
	"fmt"
	"context"

	"gitlab.com/gitlab-org/fleeting/nesting/api"
)

func Example(ctx context.Context) {
	conn, err := api.DefaultConn()
	if err != nil {
		return err
	}

	cli := api.New(conn)

	// cli.Init(ctx)
	// vm, err := cli.Create(ctx, "image")
	// defer cli.Delete(vm.GetId())

	vms, err := cli.List(ctx)
	if err != nil {
		return err
	}

	for _, vm := range vms {
		fmt.Println(vm.GetId(), vm.GetName(), vm.GetAddr())
	}
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NAME      = "nesting"
	VERSION   = "dev"
	REVISION  = "HEAD"
	REFERENCE = "HEAD"
	BUILT     = "now"

	Version VersionInfo
)

Functions

This section is empty.

Types

type VersionInfo

type VersionInfo struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	Revision     string `json:"revision"`
	Reference    string `json:"reference"`
	GOVersion    string `json:"go_version"`
	BuiltAt      string `json:"built_at"`
	OS           string `json:"os"`
	Architecture string `json:"architecture"`
}

func (*VersionInfo) BuildInfo

func (v *VersionInfo) BuildInfo() string

func (*VersionInfo) Full

func (v *VersionInfo) Full() string

func (*VersionInfo) String

func (v *VersionInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL