MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / getTargetName

Function getTargetName

internal/vnc/proxy.go:116–122  ·  view source on GitHub ↗

getTargetName returns a descriptive name for the target (VM name or node name).

(config *ProxyConfig)

Source from the content-addressed store, hash-verified

114
115// getTargetName returns a descriptive name for the target (VM name or node name).
116func getTargetName(config *ProxyConfig) string {
117 if config.VMType == "node" {
118 return config.NodeName
119 }
120
121 return fmt.Sprintf("VM-%d", config.VMID)
122}
123
124// HandleWebSocketProxy handles incoming WebSocket connections from noVNC client
125// and proxies them to the Proxmox VNC websocket endpoint.

Callers 3

HandleWebSocketProxyMethod · 0.85
connectToProxmoxMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected