mirror of
https://github.com/bettercap/bettercap
synced 2025-07-15 01:23:42 -07:00
new: pushed new graph experimental module
This commit is contained in:
parent
ca2e257fbb
commit
826f13e47a
11 changed files with 1480 additions and 0 deletions
15
modules/graph/js_builtin.go
Normal file
15
modules/graph/js_builtin.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package graph
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/log"
|
||||
)
|
||||
|
||||
type graphPackage struct{}
|
||||
|
||||
func (g graphPackage) IsConnected(nodeType, nodeID string) bool {
|
||||
if Loaded == nil {
|
||||
log.Error("graph.IsConnected: graph not loaded")
|
||||
return false
|
||||
}
|
||||
return Loaded.IsConnected(nodeType, nodeID)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue