models

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterPreload

func ClusterPreload()

func GetMaxVMDockerPort

func GetMaxVMDockerPort() (int, error)

func GetNextVMID

func GetNextVMID() (uint, error)

func GetVMIPv4

func GetVMIPv4(id uint) string

func GetVMIPv6

func GetVMIPv6(id uint) string

func VMPreload

func VMPreload()

Types

type Cluster

type Cluster struct {
	ID             uint
	Name           string
	KindConfigPath string
	VM             string
}

func ListCluster

func ListCluster() ([]Cluster, error)

func NewCluster

func NewCluster(name, kindConfigPath, vm string) *Cluster

func (*Cluster) AssignID

func (cluster *Cluster) AssignID() error

func (*Cluster) Delete

func (cluster *Cluster) Delete() error

func (*Cluster) Exists

func (cluster *Cluster) Exists() (bool, error)

func (*Cluster) GetByName

func (cluster *Cluster) GetByName() error

func (*Cluster) LoadConfigAsYAMLFromDisk added in v0.0.7

func (cluster *Cluster) LoadConfigAsYAMLFromDisk() (map[string]interface{}, error)

func (*Cluster) LoadConfigFromDisk added in v0.0.7

func (cluster *Cluster) LoadConfigFromDisk() ([]byte, error)

func (*Cluster) Save

func (cluster *Cluster) Save() error

type VM

type VM struct {
	ID             uint
	Name           string
	LimaConfigPath string
	DockerPort     int
}

func ListVM

func ListVM() ([]*VM, error)

func NewVM

func NewVM(name, limaConfigPath string, dockerPort int) *VM

func (*VM) Delete

func (vm *VM) Delete() error

func (*VM) Exists

func (vm *VM) Exists() (bool, error)

func (*VM) GetByName

func (vm *VM) GetByName() error

func (*VM) GetVMIPv4

func (vm *VM) GetVMIPv4() string

func (*VM) GetVMIPv6

func (vm *VM) GetVMIPv6() string

func (*VM) Save

func (vm *VM) Save() error

Jump to

Keyboard shortcuts

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