MCPcopy Create free account
hub / github.com/jetkvm/kvm / rpcSetLocalLoopbackOnly

Function rpcSetLocalLoopbackOnly

jsonrpc.go:1159–1172  ·  view source on GitHub ↗
(enabled bool)

Source from the content-addressed store, hash-verified

1157}
1158
1159func rpcSetLocalLoopbackOnly(enabled bool) error {
1160 // Check if the setting is actually changing
1161 if config.LocalLoopbackOnly == enabled {
1162 return nil
1163 }
1164
1165 // Update the setting
1166 config.LocalLoopbackOnly = enabled
1167 if err := SaveConfig(); err != nil {
1168 return fmt.Errorf("failed to save config: %w", err)
1169 }
1170
1171 return nil
1172}
1173
1174var validLogLevels = map[string]bool{
1175 "TRACE": true,

Callers

nothing calls this directly

Calls 2

SaveConfigFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected