MCPcopy Create free account

hub / github.com/OnitiFR/mulch / functions

Functions644 in github.com/OnitiFR/mulch

↓ 4 callersFunctionParseDuration
ParseDuration returns a duration from string (ex: 1h, 10d, 1y) An empty string is valid (expiration = 0)
cmd/mulch/client/tools.go:34
↓ 4 callersFunctionRemoveAPIKeyFromString
RemoveAPIKeyFromString replace any API key appearance in the string
common/api.go:20
↓ 4 callersMethodRun
Run will start the app (in the foreground)
cmd/mulch-proxy/app.go:294
↓ 4 callersMethodSetOperation
SetOperation change VM WIP
cmd/mulchd/server/vm.go:97
↓ 4 callersMethodTrace
Trace sends an MessageTrace Message
cmd/mulch-proxy/log.go:87
↓ 4 callersFunctionVMBackup
VMBackup launch the backup process (returns backup filename)
cmd/mulchd/server/vm.go:1210
↓ 4 callersFunctionvmConfigGetScript
(tScript string, prefixURL string, origins *Origins)
cmd/mulchd/server/vm_config.go:143
↓ 3 callersMethodCloneVolume
CloneVolume clones a source volume to a destination volume in the same pool
cmd/mulchd/server/libvirt.go:279
↓ 3 callersMethodCount
Count returns the number of VMs in the database
cmd/mulchd/server/vm_database.go:593
↓ 3 callersFunctionCreateSSHMulchDir
CreateSSHMulchDir creates (if needed) user SSH config path and, inside, mulch directory.
cmd/mulch/client/ssh.go:27
↓ 3 callersMethodDecrypt
decrypt data with the passphrase using AES and GCM
cmd/mulchd/server/secret_database.go:404
↓ 3 callersMethodEncrypt
encrypt data with the passphrase using AES and GCM
cmd/mulchd/server/secret_database.go:382
↓ 3 callersMethodGetActiveByName
GetActiveByName return the active VM with the specified name
cmd/mulchd/server/vm_database.go:522
↓ 3 callersMethodGetByName
GetByName lookups a SSHPair by its name, or nil if not found
cmd/mulchd/server/sshpair_database.go:125
↓ 3 callersMethodGetOrCreateStoragePool
GetOrCreateStoragePool retreives (and create, if necessary) a storage pool (mode is the Unix access mode for the pool directory) I've seen strange th
cmd/mulchd/server/libvirt.go:111
↓ 3 callersFunctionGetSSHHost
GetSSHHost returns the SSH server hostname based on mulchd API URL
cmd/mulch/client/ssh.go:50
↓ 3 callersMethodGetVMsUsingSecret
GetVMsUsingSecret returns a list of VMs that use a given secret, including other peers.
cmd/mulchd/server/secret_database.go:556
↓ 3 callersMethodIsActive
()
cmd/mulch-proxy/rate_controller.go:55
↓ 3 callersMethodLoad
ExtraCertsDB will load the extra certificates from the configuration file
cmd/mulch-proxy/extra_certs.go:79
↓ 3 callersFunctionMakeSSHKey
MakeSSHKey generates a OpenSSH formatted key pair (ED25519)
cmd/mulchd/server/ssh_keys.go:17
↓ 3 callersFunctionNewVM
NewVM builds a new virtual machine from config TODO: this function is HUUUGE and needs to be splitted. It's tricky because there's a "transaction" her
cmd/mulchd/server/vm.go:233
↓ 3 callersFunctionNewVolumeDownloadToWriter
NewVolumeDownloadToWriter creates a VolumeDownload instance, allowing to download a file from a libvirt storage pool to an io.WriteCloser
cmd/mulchd/volumes/volume_download.go:18
↓ 3 callersMethodRefreshReverseProxies
RefreshReverseProxies create new (internal) ReverseProxy instances This function should be called when DomainDB is updated
cmd/mulch-proxy/proxy.go:407
↓ 3 callersMethodRegister
Register a new client of the Hub clientInfo is not currently used but is supposed to differentiate the client. Target may be common.MessageNoTarget.
cmd/mulchd/server/hub.go:79
↓ 3 callersFunctionRenderTableString
(headers []string, data [][]string, conf tablewriter.Config)
cmd/mulch/client/table.go:12
↓ 3 callersMethodSave
Save the database on the disk
cmd/mulchd/server/api_keys.go:139
↓ 3 callersMethodString
String will convert a right to a string
cmd/mulchd/server/api_keys.go:546
↓ 3 callersMethodSyncPeers
SyncPeers syncs the secret database with peers
cmd/mulchd/server/secret_database.go:426
↓ 3 callersMethodUploadFileToLibvirt
UploadFileToLibvirt is a variant using a file as source
cmd/mulchd/server/libvirt.go:390
↓ 3 callersFunctionVMDetachBackup
VMDetachBackup detach the backup volume from the VM
cmd/mulchd/server/vm.go:1163
↓ 3 callersFunctionVMGetDiskName
VMGetDiskName return VM's disk filename
cmd/mulchd/server/vm.go:739
↓ 3 callersFunctionVMRestoreNoChecks
VMRestoreNoChecks launch the restore process, this function is a symetric of VMBackup, since a few checks are missing because it's supposed to be call
cmd/mulchd/server/vm.go:1418
↓ 3 callersFunctionVMStartByName
VMStartByName starts a VM using its name and waits until the VM phones home. (or timeouts)
cmd/mulchd/server/vm.go:842
↓ 3 callersFunctiondeleteBackup
(backupName string, req *server.Request)
cmd/mulchd/controllers/backup.go:77
↓ 3 callersMethodgenErrorPage
(code int, message string)
cmd/mulch-proxy/proxy.go:188
↓ 3 callersMethodisKeyAllowed
(key ssh.PublicKey)
cmd/mulchd/server/ssh_agent.go:32
↓ 3 callersFunctionnewTestProxyFront
newTestProxyFront builds an httptest server that proxies to backendURL using the errorHandlingRoundTripper, optionally simulating the concurrent rate-
cmd/mulch-proxy/proxy_test.go:24
↓ 3 callersMethodrebuildDHCPStaticLeases
non-mutex-locked internal version of RebuildDHCPStaticLeases
cmd/mulchd/server/libvirt_dhcp.go:53
↓ 3 callersMethodsave
This is done internaly, because it must be done with the mutex locked, but we can't lock it here, since save() is called by functions that are already
cmd/mulchd/server/backup_database.go:59
↓ 3 callersMethodsave
save the database to disk (without a mutex lock)
cmd/mulchd/server/secret_database.go:238
↓ 2 callersMethodAddNew
AddNew and add a SSH pair
cmd/mulchd/server/sshpair_database.go:101
↓ 2 callersMethodAddNew
AddNew generates a new key and adds it to the database
cmd/mulchd/server/api_keys.go:226
↓ 2 callersFunctionBackupDelete
(backupName string, app *App)
cmd/mulchd/server/backup.go:19
↓ 2 callersFunctionCleanURL
CleanURL clean the URL using path.Clean rules
common/api.go:10
↓ 2 callersMethodDump
Dump RequestList content to a Log
cmd/mulch-proxy/request_list.go:64
↓ 2 callersMethodGetAllVMsUsingSecret
GetAllVMsUsingSecret returns a list of VMs that use a given secret, including on other peers.
cmd/mulchd/server/secret_database.go:619
↓ 2 callersMethodGetKeys
GetKeys returns all keys
cmd/mulchd/server/secret_database.go:207
↓ 2 callersMethodGetOriginFromPath
GetOriginFromPath returns the origin, the subpath and an error if any - if the path does not use an origin, it returns an empty origin and no error
cmd/mulchd/server/origin.go:99
↓ 2 callersMethodGetSecretsMap
GetSecretsMap returns a map of secrets for a VM The map contains all existing secrets, even if err is not nil
cmd/mulchd/server/vm.go:103
↓ 2 callersMethodGetTotalConnections
GetTotalConnections return the total connection count for all listeners
cmd/mulch-proxy/port_server.go:49
↓ 2 callersFunctionGetURLScheme
GetURLScheme returns the scheme of the given URL
cmd/mulchd/server/tools.go:44
↓ 2 callersFunctionIPStringToInt
IPStringToInt convert an IPv4 string to a unsigned int 32
cmd/mulchd/server/network.go:12
↓ 2 callersMethodIsPaused
IsPaused returns true if the seed is paused
cmd/mulchd/server/seeds.go:516
↓ 2 callersFunctionIsRebuildNeeded
IsRebuildNeeded return true if lastRebuild is older than rebuildSetting
cmd/mulchd/server/auto_rebuild.go:97
↓ 2 callersMethodListen
Listen will wait for client connections
cmd/mulch-proxy/port_listener.go:60
↓ 2 callersMethodMatchTarget
MatchTarget returns true if the message matches the target exact searches are usefull for specific target logs (excluding all "global" messages)
common/message.go:80
↓ 2 callersFunctionNewLog
NewLog creates a new log
cmd/mulch-proxy/log.go:41
↓ 2 callersFunctionNewVMController
NewVMController creates a new VM
cmd/mulchd/controllers/vm.go:151
↓ 2 callersMethodRebuildDHCPStaticLeases
RebuildDHCPStaticLeases will clean static DHCP leases database
cmd/mulchd/server/libvirt_dhcp.go:45
↓ 2 callersMethodRefreshSeed
RefreshSeed will download a seed image using its URL
cmd/mulchd/server/seeds.go:369
↓ 2 callersMethodRefreshSeeder
RefreshSeeder will rebuild seeder using a VM
cmd/mulchd/server/seeds.go:234
↓ 2 callersMethodResizeDisk
ResizeDisk will change volume ("disk") size (do not reduce a volume without knowing what you are doing!)
cmd/mulchd/server/libvirt.go:429
↓ 2 callersFunctionSSHSendKeepAlive
SSHSendKeepAlive sends a keepalive request using a timeout
cmd/mulchd/server/ssh.go:115
↓ 2 callersMethodSave
Save the DB to disk
cmd/mulchd/server/sshpair_database.go:55
↓ 2 callersMethodSave
Save the database to disk
cmd/mulchd/server/secret_database.go:222
↓ 2 callersFunctionStringExpandVariables
StringExpandVariables expands "variables" ($test, for instance) in str and returns a new string
common/tools.go:103
↓ 2 callersMethodSuccess
Success sends an MessageSuccess Message
cmd/mulchd/server/log.go:88
↓ 2 callersMethodSyncWithDatabase
SyncWithDatabase syncs our secret database with another database (ex: from another peer) It returns (our) "newer" entries so the remote peer can merge
cmd/mulchd/server/secret_database.go:518
↓ 2 callersMethodUpdate
Update saves the DB with current VM states
cmd/mulchd/server/vmstate_database.go:89
↓ 2 callersMethodUpdateForwardMap
UpdateForwardMap will update our forwarding config
cmd/mulch-proxy/port_listener.go:139
↓ 2 callersMethodUploadFileToLibvirtFromReader
UploadFileToLibvirtFromReader uploads a file to libvirt storage
cmd/mulchd/server/libvirt.go:343
↓ 2 callersFunctionVMAttachBackup
VMAttachBackup attach a backup volume to the VM
cmd/mulchd/server/vm.go:1096
↓ 2 callersFunctionVMControllerConfigCheck
VMControllerConfigCheck will validate TOML sent in the 'config' request field and check if VM is a duplicate
cmd/mulchd/controllers/vm.go:62
↓ 2 callersFunctionVMRebuild
VMRebuild delete VM and rebuilds it from a backup (using revisions)
cmd/mulchd/server/vm.go:1649
↓ 2 callersMethodWaitRestore
WaitRestore blocks until VM states are not restored, so non-crucial tasks can kindly wait for a "quiter" system load. NOTE: very crude timeout-baed im
cmd/mulchd/server/vmstate_database.go:214
↓ 2 callersMethodWarningf
Warningf sends a formated string MessageWarning Message
cmd/mulch-proxy/log.go:70
↓ 2 callersFunctionWriteSSHPair
WriteSSHPair overwrites public and private API SSH files, using an APISSHPair reader (see "GET /sshpair") as input. Returns public key filepath, priva
cmd/mulch/client/ssh.go:62
↓ 2 callersMethodcheckPSK
(request *http.Request)
cmd/mulch-proxy/api_server.go:63
↓ 2 callersMethodclose
close the forwarding
cmd/mulch-proxy/port_forward.go:88
↓ 2 callersFunctiondownloadFile
(filename string, reader io.Reader)
cmd/mulch/client/apicall.go:315
↓ 2 callersFunctiongetContentFromFileURL
file:// protocol (also accepts file paths: /home/user/file.txt)
cmd/mulchd/server/origin.go:149
↓ 2 callersFunctiongetContentFromHttpURL
http:// or https:// protocol (with conditional GET caching)
cmd/mulchd/server/origin.go:173
↓ 2 callersMethodkeyExists
keyExists return true if the key address exists in the database
cmd/mulchd/server/api_keys.go:182
↓ 2 callersFunctionlistScripts
(scriptsPath string)
cmd/mulchd/server/alert.go:35
↓ 2 callersMethodload
()
cmd/mulch-proxy/domain_database.go:45
↓ 2 callersMethodpipe
pipe a reader to a writer
cmd/mulch-proxy/port_forward.go:69
↓ 2 callersFunctionportExtractComment
portExtractComment extracts the (comment) from a port string
cmd/mulchd/server/vm_port.go:333
↓ 2 callersMethodrefreshListeners
sync listeners and update forward maps
cmd/mulch-proxy/port_server.go:58
↓ 2 callersMethodrefreshParentDomains
contact our parent proxy and send all our routes so he can forward requests
cmd/mulch-proxy/app.go:251
↓ 2 callersMethodregisterRouteHandlers
(mux *http.ServeMux, inRoutes map[string][]*Route)
cmd/mulchd/server/route_handler.go:180
↓ 2 callersMethodreportError
(seed *Seed, err error)
cmd/mulchd/server/seeds.go:179
↓ 2 callersFunctionrequestGetMulchParam
extract a generic parameter from the request (API key, protocol, etc) from the headers (new way, "Mulch-Name") or from FormValue (old way, "name")
cmd/mulchd/server/route_handler.go:47
↓ 2 callersMethodrunChannels
runChannels is the the core of the ssh-proxy, where we manage channels and requests the usual destination is the VM, but see ClientHandleChannelOpen()
cmd/mulchd/server/ssh_proxy.go:108
↓ 2 callersMethodsave
This is done internaly, because it must be done with the mutex locked, but we can't lock it here, since save() is called by functions that are already
cmd/mulchd/server/vmstate_database.go:57
↓ 2 callersMethodsave
only needed for proxy chain parents
cmd/mulch-proxy/domain_database.go:64
↓ 2 callersMethodsaveToWriter
save the database to a writer (without a mutex lock)
cmd/mulchd/server/secret_database.go:252
↓ 2 callersMethodscheduleSSHKeepAlives
Send sparses keepalives to detect dead connections, a failed SendRequest will set channels to nil, closing the connections (and we use a timeout as we
cmd/mulchd/server/ssh_proxy.go:91
↓ 2 callersMethodselfCall
()
cmd/mulchd/server/cert_manager.go:130
↓ 2 callersFunctionsshProxyCopyChan
(dst ssh.Channel, src ssh.Channel, way string, wgChannels *sync.WaitGroup, wgClosed *sync.WaitGroup, log *Log)
cmd/mulchd/server/ssh_proxy.go:51
↓ 2 callersFunctionvmCheckScriptURL
(scriptURL string, origins *Origins)
cmd/mulchd/server/vm_config.go:122
← previousnext →101–200 of 644, ranked by callers