Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abshkbh/arrakis
/ functions
Functions
131 in github.com/abshkbh/arrakis
⨍
Functions
131
◇
Types & classes
24
↓ 56 callers
Method
String
()
pkg/server/server.go:49
↓ 20 callers
Function
sendErrorResponse
sendErrorResponse sends a standardized error response to the client.
cmd/restserver/main.go:27
↓ 19 callers
Function
runCmd
runCmd runs `cmdName` with `args`.
cmd/rootfsmaker/main.go:29
↓ 12 callers
Function
parseErrorResponse
parseErrorResponse attempts to parse the HTTP response body as an ErrorResponse. It returns a formatted error with the error message from the response
cmd/client/main.go:27
↓ 10 callers
Method
getVMAtomic
(vmName string)
pkg/server/server.go:787
↓ 6 callers
Function
cleanupAllIPTablesRulesForIP
(ip string)
pkg/server/server.go:337
↓ 6 callers
Function
writeJSON
Utility function to write JSON response
cmd/cmdserver/main.go:321
↓ 5 callers
Function
String
(s string)
pkg/server/server.go:97
↓ 4 callers
Function
convertPortForward
convertPortForward converts the port forwards from the config to the API format.
pkg/server/server.go:600
↓ 3 callers
Method
FreeCID
FreeCID returns a CID to the pool of available CIDs
pkg/server/cidallocator/cidallocator.go:53
↓ 3 callers
Method
PauseVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1680
↓ 3 callers
Method
ResumeVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1700
↓ 3 callers
Function
copyIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:26
↓ 3 callers
Method
destroyVM
(ctx context.Context, vmName string)
pkg/server/server.go:1316
↓ 3 callers
Function
incrementIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:15
↓ 2 callers
Method
CreateTapDevice
CreateTapDevice creates a new tap device with an auto-allocated ID and returns a TapDevice If id is provided, it will attempt to claim that specific I
pkg/server/fountain/fountain.go:113
↓ 2 callers
Method
DestroyAllVMs
(ctx context.Context)
pkg/server/server.go:1362
↓ 2 callers
Method
DestroyTapDevice
DestroyTapDevice destroys a tap device and frees its ID.
pkg/server/fountain/fountain.go:167
↓ 2 callers
Method
FreeIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:71
↓ 2 callers
Function
Int32
(i int32)
pkg/server/server.go:101
↓ 2 callers
Method
boot
( ctx context.Context, )
pkg/server/server.go:1029
↓ 2 callers
Function
copyFile
copyFile copies a file from sourcePath to destPath. Both parent directories should exist before calling this function.
pkg/server/server.go:490
↓ 2 callers
Method
createVM
( ctx context.Context, vmName string, kernelPath string, initramfsPath string, rootfsPath string, forRes
pkg/server/server.go:798
↓ 2 callers
Method
freeTapID
freeTapID returns a tap ID to the pool of available IDs (internal use).
pkg/server/fountain/fountain.go:65
↓ 2 callers
Function
parseKeyFromCmdLine
parseKeyFromCmdLine parses a key from the kernel command line. Assumes each key:val is present like key="val" in /proc/cmdline.
cmd/guestinit/main.go:20
↓ 2 callers
Function
reapProcess
(process *os.Process, logger *log.Entry, timeout time.Duration)
pkg/server/server.go:574
↓ 2 callers
Method
resume
( ctx context.Context, )
pkg/server/server.go:1048
↓ 2 callers
Method
setupPortForwardsToVM
setupPortForwardsToVM forwards the given port forwards to the VM.
pkg/server/server.go:283
↓ 2 callers
Method
setupSinglePortForward
setupSinglePortForward creates an iptables rule to forward a port and returns the port forward details
pkg/server/server.go:225
↓ 2 callers
Function
startVM
(vmName string, kernel string, rootfs string, entryPoint string, snapshotId string)
cmd/client/main.go:84
↓ 2 callers
Function
waitForCmdServerReady
waitForCmdServerReady checks if the command server in the guest VM is ready by sending a GET request to it. Returns nil if the command server is ready
pkg/server/server.go:1889
↓ 1 callers
Method
AllocateCID
AllocateCID allocates and returns the next available CID
pkg/server/cidallocator/cidallocator.go:37
↓ 1 callers
Method
AllocateIP
()
pkg/server/ipallocator/ipallocator.go:54
↓ 1 callers
Method
AllocatePort
AllocatePort allocates and returns the next available port
pkg/server/portallocator/portallocator.go:37
↓ 1 callers
Function
Bool
(b bool)
pkg/server/server.go:105
↓ 1 callers
Method
ClaimCID
ClaimCID claims a specific CID from the pool of available CIDs
pkg/server/cidallocator/cidallocator.go:73
↓ 1 callers
Method
ClaimIP
ClaimIP attempts to claim a specific IP address from the pool. Returns error if the IP is already allocated or not in the subnet.
pkg/server/ipallocator/ipallocator.go:85
↓ 1 callers
Method
DestroyVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1350
↓ 1 callers
Method
FreePort
FreePort returns a port to the pool of available ports
pkg/server/portallocator/portallocator.go:53
↓ 1 callers
Function
GetClientConfig
(configFile string)
pkg/config/config.go:108
↓ 1 callers
Function
GetServerConfig
(configFile string)
pkg/config/config.go:88
↓ 1 callers
Method
ListAllVMs
(ctx context.Context)
pkg/server/server.go:1394
↓ 1 callers
Method
ListVM
(ctx context.Context, vmName string)
pkg/server/server.go:1420
↓ 1 callers
Function
NewCIDAllocator
NewCIDAllocator creates a new CID allocator for the given CID range
pkg/server/cidallocator/cidallocator.go:17
↓ 1 callers
Function
NewFountain
(bridgeDevice string)
pkg/server/fountain/fountain.go:36
↓ 1 callers
Function
NewIPAllocator
(subnetCIDR string)
pkg/server/ipallocator/ipallocator.go:32
↓ 1 callers
Function
NewPortAllocator
NewPortAllocator creates a new port allocator for the given port range
pkg/server/portallocator/portallocator.go:17
↓ 1 callers
Function
NewServer
(config config.ServerConfig)
pkg/server/server.go:718
↓ 1 callers
Method
SnapshotVM
(ctx context.Context, vmName string, snapshotId string)
pkg/server/server.go:1440
↓ 1 callers
Method
StartVM
(ctx context.Context, req *serverapi.StartVMRequest)
pkg/server/server.go:1182
↓ 1 callers
Method
StopVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1289
↓ 1 callers
Method
VMCommand
(ctx context.Context, vmName string, cmd string, blocking bool)
pkg/server/server.go:1722
↓ 1 callers
Method
VMFileDownload
(ctx context.Context, vmName string, paths string)
pkg/server/server.go:1823
↓ 1 callers
Method
VMFileUpload
(ctx context.Context, vmName string, files []serverapi.VmFileUploadRequestFilesInner)
pkg/server/server.go:1736
↓ 1 callers
Method
allocateTapID
allocateTapID allocates a new tap device ID (internal use).
pkg/server/fountain/fountain.go:51
↓ 1 callers
Function
bridgeExists
bridgeExists checks if a bridge with the given name exists.
pkg/server/server.go:206
↓ 1 callers
Function
calculateGuestMemorySizeInMB
calculateGuestMemorySizeInMB calculates the appropriate memory size for the guest.
pkg/server/server.go:147
↓ 1 callers
Function
calculateVCPUCount
calculateVCPUCount returns an appropriate number of vCPUs based on host's CPU count. It ensures the VM has enough CPU resources while not overcommitti
pkg/server/server.go:131
↓ 1 callers
Method
claimID
claimID attempts to claim a specific tap ID from the pool It returns an error if the ID is not available or outside the valid range
pkg/server/fountain/fountain.go:84
↓ 1 callers
Function
cleanupBridge
()
pkg/server/server.go:410
↓ 1 callers
Function
cleanupTapDevices
()
pkg/server/server.go:391
↓ 1 callers
Function
createApiClient
(apiSocketPath string)
pkg/server/server.go:534
↓ 1 callers
Function
createApiClient
(serverAddr string)
cmd/client/main.go:146
↓ 1 callers
Function
createRootfsFromDockerfile
(dockerFile string, outputFile string)
cmd/rootfsmaker/main.go:36
↓ 1 callers
Function
createStatefulDisk
(path string, sizeInMB int32)
pkg/server/server.go:697
↓ 1 callers
Method
destroy
( ctx context.Context, )
pkg/server/server.go:1094
↓ 1 callers
Function
destroyAllVMs
()
cmd/client/main.go:74
↓ 1 callers
Function
destroyVM
(vmName string)
cmd/client/main.go:64
↓ 1 callers
Function
downloadFiles
(vmName string, paths []string)
cmd/client/main.go:275
↓ 1 callers
Function
download_file
Download a file from URL to destination.
setup/install-images.py:12
↓ 1 callers
Function
ensure_directory_exists
Create directory if it doesn't exist.
setup/install-images.py:8
↓ 1 callers
Function
extractGuestIPFromCmdline
(cmdline string)
pkg/server/server.go:628
↓ 1 callers
Function
getIPPrefix
getIPPrefix returns the IP prefix from the given CIDR taking into account the mask.
pkg/server/server.go:673
↓ 1 callers
Function
getKernelCmdLine
(gatewayIP string, guestIP string)
pkg/server/server.go:197
↓ 1 callers
Function
getVmSocketPath
(vmStateDir string, vmName string)
pkg/server/server.go:519
↓ 1 callers
Function
getVmStateDirPath
(stateDir string, vmName string)
pkg/server/server.go:484
↓ 1 callers
Function
getVsockPath
(vmName string)
cmd/vsockclient/main.go:22
↓ 1 callers
Function
handleConnection
(conn *vsock.Conn)
cmd/vsockserver/main.go:22
↓ 1 callers
Method
handleRun
(ctx context.Context, client *http.Client, baseURL string, cmd string, blocking bool)
pkg/server/server.go:1782
↓ 1 callers
Function
listAllVMs
()
cmd/client/main.go:114
↓ 1 callers
Function
listVM
(vmName string)
cmd/client/main.go:289
↓ 1 callers
Function
main
()
setup/install-images.py:32
↓ 1 callers
Function
parseNetworkDataFromSnapshotConfig
Returns the tap device name and the guest IP address from the snapshot config.
pkg/server/server.go:646
↓ 1 callers
Function
parseNetworkingMetadata
parseNetworkingMetadata parses the networking metadata from the kernel command line.
cmd/guestinit/main.go:44
↓ 1 callers
Function
parseTapDeviceId
parseTapDeviceId extracts the numeric ID from a tap device name. It expects the name to be in the format "tap<id>" where <id> is an integer.
pkg/server/server.go:1869
↓ 1 callers
Method
pause
( ctx context.Context, )
pkg/server/server.go:1153
↓ 1 callers
Function
pauseVM
(vmName string)
cmd/client/main.go:194
↓ 1 callers
Method
restore
( ctx context.Context, snapshotPath string, )
pkg/server/server.go:1067
↓ 1 callers
Function
restoreVM
(vmName string, snapshotId string)
cmd/client/main.go:190
↓ 1 callers
Method
restoreVM
( ctx context.Context, vmName string, snapshotId string, )
pkg/server/server.go:1555
↓ 1 callers
Function
resumeVM
(vmName string)
cmd/client/main.go:207
↓ 1 callers
Function
runCommand
(vmName string, cmd string)
cmd/client/main.go:257
↓ 1 callers
Function
runCommand
(client *http.Client, cmd string)
cmd/vsockclient/cmdclient/main.go:38
↓ 1 callers
Function
setupBridgeAndFirewall
setupBridgeAndFirewall sets up a bridge and firewall rules for the given bridge name, IP address, and subnet.
pkg/server/server.go:427
↓ 1 callers
Function
setupNetworking
setupNetworking sets up networking inside the guest.
cmd/guestinit/main.go:69
↓ 1 callers
Function
snapshotVM
(vmName string, snapshotId string)
cmd/client/main.go:176
↓ 1 callers
Function
startInteractiveSession
(socketPath string, port int)
cmd/vsockclient/main.go:26
↓ 1 callers
Function
stopVM
(vmName string)
cmd/client/main.go:48
↓ 1 callers
Function
unixSocketClient
(socketPath string)
pkg/server/server.go:523
↓ 1 callers
Function
unixSocketHTTPClient
(socketPath string)
cmd/vsockclient/cmdclient/main.go:27
next →
1–100 of 131, ranked by callers