goplaykeytools

package module
v0.0.0-...-317d69f Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 2 Imported by: 0

README

go-playkeytools

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemUnit

type MemUnit string
const (
	MemGiB MemUnit = "GiB"
	MemMiB MemUnit = "MiB"
)

type PkGsConfig

type PkGsConfig struct {
	XMLName    xml.Name `xml:"Config"`
	HostConfig PkGsHostConfig
	Vms        PkGsVmsConfig
}

func NewPkGsConfig

func NewPkGsConfig(hostConfig PkGsHostConfig, vms PkGsVmsConfig) (conf PkGsConfig)

type PkGsCpuMemConfig

type PkGsCpuMemConfig struct {
	Cpu    int `xml:"Cpu"`
	Memory PkVmMemSize
}

type PkGsDisk

type PkGsDisk struct {
	XMLName xml.Name `xml:"Disk"`
	System  int      `xml:"system,attr,omitempty"`
	Origin  string   `xml:"Origin"`
	Prefix  string   `xml:"Prefix"`
	Clone   string   `xml:"Clone,omitempty"`
}

func NewPkGsDisk

func NewPkGsDisk(origin string, prefix string, clone string, systemDisk bool) (disk PkGsDisk)

type PkGsHostConfig

type PkGsHostConfig struct {
	XMLName         xml.Name   `xml:"Host"`
	Name            string     `xml:"name,attr"`
	ZfsApi          PkGsZfsApi `xml:"ZfsApi"`
	PlaykeyApi      string     `xml:"PlaykeyApi"`
	TargetAddress   string     `xml:"TargetAddress"`
	TargetPort      int        `xml:"TargetPort"`
	RemoteHost      string     `xml:"RemoteHost"`
	RemotePort      int        `xml:"RemotePort"`
	AdapterName     string     `xml:"AdapterName"`
	TemplateFile    string     `xml:"TemplateFile"`
	FilebeatConfig  string     `xml:"FilebeatConfig"`
	LogstashAddress string     `xml:"LogstashAddress"`
	CopyFolder      string     `xml:"CopyFolder"`
	VmAutoconf      PkVmAutoConfig
	PkGsHostCpuMem
}

func NewPkGsHostConfig

func NewPkGsHostConfig(hostName string, zfsApi PkGsZfsApi, targetAddress string, targetPort int, templateFile string, vmAutoConf PkVmAutoConfig, hostCpus int, hostMemGiB int) (hostConfig PkGsHostConfig)

type PkGsHostCpuMem

type PkGsHostCpuMem struct {
	PkGsCpuMemConfig
}

type PkGsVmsConfig

type PkGsVmsConfig struct {
	XMLName xml.Name        `xml:"Servers"`
	Vms     []PkVmAdvConfig `xml:"Server"`
}

type PkGsZfsApi

type PkGsZfsApi struct {
	XMLName xml.Name `xml:"ZfsApi"`
	Address string   `xml:"address,attr"`
	Disks   []PkGsDisk
}

func NewPkGsZfsApi

func NewPkGsZfsApi(zfsApiAddr string, systemDisk PkGsDisk, gamesDisk PkGsDisk, storeDisk PkGsDisk) (zfsApi PkGsZfsApi)

type PkVmAdvConfig

type PkVmAdvConfig struct {
	XMLName xml.Name `xml:"Server"`
	Name    string   `xml:"name,attr"`
	PkGsCpuMemConfig
	Gpu string `xml:"Gpu"`
	IP  string `xml:"IP"`
}

func NewPkVm

func NewPkVm(name string, numCpu int, mem int, memUnit MemUnit, gpuAddr string, ip string) (vm PkVmAdvConfig)

type PkVmAutoConfig

type PkVmAutoConfig struct {
	XMLName xml.Name `xml:"VmAutoconf"`
	Minimal PkVmMinConfig
	PkGsCpuMemConfig
}

func NewPkGsVmAutoConfig

func NewPkGsVmAutoConfig(minCpu int, minMem int, maxCpu int, maxMem int, memUnit MemUnit) (vmAutoConf PkVmAutoConfig)

type PkVmMemSize

type PkVmMemSize struct {
	XMLName xml.Name `xml:"Memory"`
	Unit    MemUnit  `xml:"unit,attr"`
	Size    int      `xml:",chardata"`
}

type PkVmMinConfig

type PkVmMinConfig struct {
	XMLName xml.Name `xml:"Minimal"`
	PkGsCpuMemConfig
}

Jump to

Keyboard shortcuts

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