cmd

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Version is the current version. it should be set by goreleaser
	Version string
	// commit is also set by goreleaser (in main.go)
	Commit string
)

Functions

func CopyFile

func CopyFile(src, dst string) (err error)

CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherwise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func HumanUint32

func HumanUint32(num uint32) string

HumanUint32 returns the number in a human readable format

Types

type CrashEvent added in v0.1.8

type CrashEvent struct {
	Message string `json:"message"`
	Error   error  `json:"error"`
	Stack   string `json:"stack"`
}

type InitialStatusEvent added in v0.1.10

type InitialStatusEvent struct {
	Status string `json:"status"`
	Logs   string `json:"logs"`
}

type LocalState added in v0.1.10

type LocalState struct {
	Stats StatsState `json:"stats"`
}

type LogForwarder added in v0.1.8

type LogForwarder struct {
	Remote *remote.Connection
}

func (*LogForwarder) Write added in v0.1.8

func (f *LogForwarder) Write(p []byte) (n int, err error)

type MinepkgMapping

type MinepkgMapping struct {
	Platform string `json:"platform"`
	Modpack  string `json:"modpack"`
}

MinepkgMapping is a server mapping (very unfinished)

type ProgressEvent added in v0.1.8

type ProgressEvent struct {
	Progress float32 `json:"progress"`
	Message  string  `json:"message"`
}

type Root added in v0.1.5

type Root struct {
	HTTPClient *http.Client
	MinepkgAPI *api.MinepkgAPI

	NonInteractive bool
	// contains filtered or unexported fields
}

type StatsEvent added in v0.1.8

type StatsEvent struct {
	Memory               *mem.VirtualMemoryStat `json:"memory"`
	ProcessMemoryPercent float32                `json:"processMemoryPercent"`
	ProcessMemoryMiB     float32                `json:"processMemoryMiB"`
	ProcessCPUPercent    float64                `json:"processCPUPercent"`
}

type StatsState added in v0.1.10

type StatsState struct {
	Memory []float32 `json:"memory"`
	CPU    []float32 `json:"cpu"`
}

type TheThing added in v0.1.10

type TheThing struct {
	*remote.Connection
	State *LocalState
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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