MCPcopy Create free account

hub / github.com/abshkbh/arrakis / functions

Functions131 in github.com/abshkbh/arrakis

↓ 56 callersMethodString
()
pkg/server/server.go:49
↓ 20 callersFunctionsendErrorResponse
sendErrorResponse sends a standardized error response to the client.
cmd/restserver/main.go:27
↓ 19 callersFunctionrunCmd
runCmd runs `cmdName` with `args`.
cmd/rootfsmaker/main.go:29
↓ 12 callersFunctionparseErrorResponse
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 callersMethodgetVMAtomic
(vmName string)
pkg/server/server.go:787
↓ 6 callersFunctioncleanupAllIPTablesRulesForIP
(ip string)
pkg/server/server.go:337
↓ 6 callersFunctionwriteJSON
Utility function to write JSON response
cmd/cmdserver/main.go:321
↓ 5 callersFunctionString
(s string)
pkg/server/server.go:97
↓ 4 callersFunctionconvertPortForward
convertPortForward converts the port forwards from the config to the API format.
pkg/server/server.go:600
↓ 3 callersMethodFreeCID
FreeCID returns a CID to the pool of available CIDs
pkg/server/cidallocator/cidallocator.go:53
↓ 3 callersMethodPauseVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1680
↓ 3 callersMethodResumeVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1700
↓ 3 callersFunctioncopyIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:26
↓ 3 callersMethoddestroyVM
(ctx context.Context, vmName string)
pkg/server/server.go:1316
↓ 3 callersFunctionincrementIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:15
↓ 2 callersMethodCreateTapDevice
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 callersMethodDestroyAllVMs
(ctx context.Context)
pkg/server/server.go:1362
↓ 2 callersMethodDestroyTapDevice
DestroyTapDevice destroys a tap device and frees its ID.
pkg/server/fountain/fountain.go:167
↓ 2 callersMethodFreeIP
(ip net.IP)
pkg/server/ipallocator/ipallocator.go:71
↓ 2 callersFunctionInt32
(i int32)
pkg/server/server.go:101
↓ 2 callersMethodboot
( ctx context.Context, )
pkg/server/server.go:1029
↓ 2 callersFunctioncopyFile
copyFile copies a file from sourcePath to destPath. Both parent directories should exist before calling this function.
pkg/server/server.go:490
↓ 2 callersMethodcreateVM
( ctx context.Context, vmName string, kernelPath string, initramfsPath string, rootfsPath string, forRes
pkg/server/server.go:798
↓ 2 callersMethodfreeTapID
freeTapID returns a tap ID to the pool of available IDs (internal use).
pkg/server/fountain/fountain.go:65
↓ 2 callersFunctionparseKeyFromCmdLine
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 callersFunctionreapProcess
(process *os.Process, logger *log.Entry, timeout time.Duration)
pkg/server/server.go:574
↓ 2 callersMethodresume
( ctx context.Context, )
pkg/server/server.go:1048
↓ 2 callersMethodsetupPortForwardsToVM
setupPortForwardsToVM forwards the given port forwards to the VM.
pkg/server/server.go:283
↓ 2 callersMethodsetupSinglePortForward
setupSinglePortForward creates an iptables rule to forward a port and returns the port forward details
pkg/server/server.go:225
↓ 2 callersFunctionstartVM
(vmName string, kernel string, rootfs string, entryPoint string, snapshotId string)
cmd/client/main.go:84
↓ 2 callersFunctionwaitForCmdServerReady
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 callersMethodAllocateCID
AllocateCID allocates and returns the next available CID
pkg/server/cidallocator/cidallocator.go:37
↓ 1 callersMethodAllocateIP
()
pkg/server/ipallocator/ipallocator.go:54
↓ 1 callersMethodAllocatePort
AllocatePort allocates and returns the next available port
pkg/server/portallocator/portallocator.go:37
↓ 1 callersFunctionBool
(b bool)
pkg/server/server.go:105
↓ 1 callersMethodClaimCID
ClaimCID claims a specific CID from the pool of available CIDs
pkg/server/cidallocator/cidallocator.go:73
↓ 1 callersMethodClaimIP
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 callersMethodDestroyVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1350
↓ 1 callersMethodFreePort
FreePort returns a port to the pool of available ports
pkg/server/portallocator/portallocator.go:53
↓ 1 callersFunctionGetClientConfig
(configFile string)
pkg/config/config.go:108
↓ 1 callersFunctionGetServerConfig
(configFile string)
pkg/config/config.go:88
↓ 1 callersMethodListAllVMs
(ctx context.Context)
pkg/server/server.go:1394
↓ 1 callersMethodListVM
(ctx context.Context, vmName string)
pkg/server/server.go:1420
↓ 1 callersFunctionNewCIDAllocator
NewCIDAllocator creates a new CID allocator for the given CID range
pkg/server/cidallocator/cidallocator.go:17
↓ 1 callersFunctionNewFountain
(bridgeDevice string)
pkg/server/fountain/fountain.go:36
↓ 1 callersFunctionNewIPAllocator
(subnetCIDR string)
pkg/server/ipallocator/ipallocator.go:32
↓ 1 callersFunctionNewPortAllocator
NewPortAllocator creates a new port allocator for the given port range
pkg/server/portallocator/portallocator.go:17
↓ 1 callersFunctionNewServer
(config config.ServerConfig)
pkg/server/server.go:718
↓ 1 callersMethodSnapshotVM
(ctx context.Context, vmName string, snapshotId string)
pkg/server/server.go:1440
↓ 1 callersMethodStartVM
(ctx context.Context, req *serverapi.StartVMRequest)
pkg/server/server.go:1182
↓ 1 callersMethodStopVM
(ctx context.Context, req *serverapi.VMRequest)
pkg/server/server.go:1289
↓ 1 callersMethodVMCommand
(ctx context.Context, vmName string, cmd string, blocking bool)
pkg/server/server.go:1722
↓ 1 callersMethodVMFileDownload
(ctx context.Context, vmName string, paths string)
pkg/server/server.go:1823
↓ 1 callersMethodVMFileUpload
(ctx context.Context, vmName string, files []serverapi.VmFileUploadRequestFilesInner)
pkg/server/server.go:1736
↓ 1 callersMethodallocateTapID
allocateTapID allocates a new tap device ID (internal use).
pkg/server/fountain/fountain.go:51
↓ 1 callersFunctionbridgeExists
bridgeExists checks if a bridge with the given name exists.
pkg/server/server.go:206
↓ 1 callersFunctioncalculateGuestMemorySizeInMB
calculateGuestMemorySizeInMB calculates the appropriate memory size for the guest.
pkg/server/server.go:147
↓ 1 callersFunctioncalculateVCPUCount
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 callersMethodclaimID
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 callersFunctioncleanupBridge
()
pkg/server/server.go:410
↓ 1 callersFunctioncleanupTapDevices
()
pkg/server/server.go:391
↓ 1 callersFunctioncreateApiClient
(apiSocketPath string)
pkg/server/server.go:534
↓ 1 callersFunctioncreateApiClient
(serverAddr string)
cmd/client/main.go:146
↓ 1 callersFunctioncreateRootfsFromDockerfile
(dockerFile string, outputFile string)
cmd/rootfsmaker/main.go:36
↓ 1 callersFunctioncreateStatefulDisk
(path string, sizeInMB int32)
pkg/server/server.go:697
↓ 1 callersMethoddestroy
( ctx context.Context, )
pkg/server/server.go:1094
↓ 1 callersFunctiondestroyAllVMs
()
cmd/client/main.go:74
↓ 1 callersFunctiondestroyVM
(vmName string)
cmd/client/main.go:64
↓ 1 callersFunctiondownloadFiles
(vmName string, paths []string)
cmd/client/main.go:275
↓ 1 callersFunctiondownload_file
Download a file from URL to destination.
setup/install-images.py:12
↓ 1 callersFunctionensure_directory_exists
Create directory if it doesn't exist.
setup/install-images.py:8
↓ 1 callersFunctionextractGuestIPFromCmdline
(cmdline string)
pkg/server/server.go:628
↓ 1 callersFunctiongetIPPrefix
getIPPrefix returns the IP prefix from the given CIDR taking into account the mask.
pkg/server/server.go:673
↓ 1 callersFunctiongetKernelCmdLine
(gatewayIP string, guestIP string)
pkg/server/server.go:197
↓ 1 callersFunctiongetVmSocketPath
(vmStateDir string, vmName string)
pkg/server/server.go:519
↓ 1 callersFunctiongetVmStateDirPath
(stateDir string, vmName string)
pkg/server/server.go:484
↓ 1 callersFunctiongetVsockPath
(vmName string)
cmd/vsockclient/main.go:22
↓ 1 callersFunctionhandleConnection
(conn *vsock.Conn)
cmd/vsockserver/main.go:22
↓ 1 callersMethodhandleRun
(ctx context.Context, client *http.Client, baseURL string, cmd string, blocking bool)
pkg/server/server.go:1782
↓ 1 callersFunctionlistAllVMs
()
cmd/client/main.go:114
↓ 1 callersFunctionlistVM
(vmName string)
cmd/client/main.go:289
↓ 1 callersFunctionmain
()
setup/install-images.py:32
↓ 1 callersFunctionparseNetworkDataFromSnapshotConfig
Returns the tap device name and the guest IP address from the snapshot config.
pkg/server/server.go:646
↓ 1 callersFunctionparseNetworkingMetadata
parseNetworkingMetadata parses the networking metadata from the kernel command line.
cmd/guestinit/main.go:44
↓ 1 callersFunctionparseTapDeviceId
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 callersMethodpause
( ctx context.Context, )
pkg/server/server.go:1153
↓ 1 callersFunctionpauseVM
(vmName string)
cmd/client/main.go:194
↓ 1 callersMethodrestore
( ctx context.Context, snapshotPath string, )
pkg/server/server.go:1067
↓ 1 callersFunctionrestoreVM
(vmName string, snapshotId string)
cmd/client/main.go:190
↓ 1 callersMethodrestoreVM
( ctx context.Context, vmName string, snapshotId string, )
pkg/server/server.go:1555
↓ 1 callersFunctionresumeVM
(vmName string)
cmd/client/main.go:207
↓ 1 callersFunctionrunCommand
(vmName string, cmd string)
cmd/client/main.go:257
↓ 1 callersFunctionrunCommand
(client *http.Client, cmd string)
cmd/vsockclient/cmdclient/main.go:38
↓ 1 callersFunctionsetupBridgeAndFirewall
setupBridgeAndFirewall sets up a bridge and firewall rules for the given bridge name, IP address, and subnet.
pkg/server/server.go:427
↓ 1 callersFunctionsetupNetworking
setupNetworking sets up networking inside the guest.
cmd/guestinit/main.go:69
↓ 1 callersFunctionsnapshotVM
(vmName string, snapshotId string)
cmd/client/main.go:176
↓ 1 callersFunctionstartInteractiveSession
(socketPath string, port int)
cmd/vsockclient/main.go:26
↓ 1 callersFunctionstopVM
(vmName string)
cmd/client/main.go:48
↓ 1 callersFunctionunixSocketClient
(socketPath string)
pkg/server/server.go:523
↓ 1 callersFunctionunixSocketHTTPClient
(socketPath string)
cmd/vsockclient/cmdclient/main.go:27
next →1–100 of 131, ranked by callers