Documentation
¶
Index ¶
- func FindFreeKubeApiPort() (int, error)
- func FindFreePort() (int, error)
- func FindFreeSSHPort() (int, error)
- func ForEachProvisioner(iter func(p Provisioner))
- func RegisterProvisioner(p Provisioner, fac FactoryFunc) error
- type CpuInfo
- type ExportPortPair
- type FactoryFunc
- type GpuInfo
- type GpuMemInfo
- type MachineCURD
- type MachineCURDFactory
- type MachineConfiger
- type MachineInfo
- type MachineType
- type MemInfo
- type NodeLabel
- type PerGpuInfo
- type ProcessorInfo
- type Provisioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFreeKubeApiPort ¶
func FindFreePort ¶
func FindFreeSSHPort ¶
func ForEachProvisioner ¶
func ForEachProvisioner(iter func(p Provisioner))
func RegisterProvisioner ¶
func RegisterProvisioner(p Provisioner, fac FactoryFunc) error
Types ¶
type ExportPortPair ¶
type FactoryFunc ¶
type FactoryFunc func(logger log.Logger, dir string, verbose bool) MachineCURDFactory
type GpuInfo ¶
type GpuInfo struct { DriverVersion string Gpus []*PerGpuInfo }
func NewGpuInfoParser ¶
type GpuMemInfo ¶
type GpuMemInfo struct {
// contains filtered or unexported fields
}
func (*GpuMemInfo) Free ¶
func (g *GpuMemInfo) Free() string
func (*GpuMemInfo) Total ¶
func (g *GpuMemInfo) Total() string
type MachineCURD ¶
type MachineCURD interface { Name() string Type() MachineType // HostDir returns the configuration files used for that particular machine under host GetKubeCli() *kubectl.CLI GetKubeConfig() string HostDir() string Up() error Destroy() error Info() (*MachineInfo, error) ExportKubeConfig(path string, forceOverwrite bool) error }
type MachineCURDFactory ¶
type MachineCURDFactory interface { EnsureRuntime() error NewMachine(string, MachineConfiger) (MachineCURD, error) ListMachines() ([]MachineCURD, error) }
func NewMachineFactory ¶
func NewMachineFactory(provisioner Provisioner, logger log.Logger, dir string, verbose bool) (MachineCURDFactory, error)
type MachineConfiger ¶
type MachineConfiger interface { GetCPUs() int GetMemory() int // in M bytes GetGPUs() int GetKubeAPIIP() string GetExportPorts() []ExportPortPair GetForceOverwriteConfig() bool AuditEnabled() bool GetWorkers() int GetNodeLabels() []NodeLabel GetLocalPath() string GetNodeVersion() k8s.KindK8sVersion // Info displays all configurations Info() string }
type MachineInfo ¶
type MachineType ¶
type MachineType string
const ( MachineTypeDocker MachineType = "docker" MachineTypeVagrant MachineType = "vagrant" )
func (MachineType) String ¶
func (m MachineType) String() string
type MemInfo ¶
type MemInfo struct {
// contains filtered or unexported fields
}
func NewMemInfoParser ¶
type PerGpuInfo ¶
type PerGpuInfo struct { GpuName string GpuMemInfo GpuMemInfo }
type ProcessorInfo ¶
type Provisioner ¶
type Provisioner string
const (
Unknwon Provisioner = "unknown"
)
func MustParseProvisioner ¶
func MustParseProvisioner(s string) Provisioner
func ParseProvisioner ¶
func ParseProvisioner(s string) (Provisioner, error)
func (Provisioner) String ¶
func (p Provisioner) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.