diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-12-29 12:40:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-12-29 13:30:44 +0000 |
| commit | 1b9f64757a7358e28cc89893899f4016d8d7b223 (patch) | |
| tree | 7f26171994d695bac8252ed6ad922de250e2aa0b /syz-hub/hub.go | |
| parent | 4e5820c0c41b0c979471b66497f055f5631dfd65 (diff) | |
pkg/tool: add ServeHTTP function
Dedup code in syz-ci and syz-hub.
Diffstat (limited to 'syz-hub/hub.go')
| -rw-r--r-- | syz-hub/hub.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/syz-hub/hub.go b/syz-hub/hub.go index 4b7b61354..cbeb57b12 100644 --- a/syz-hub/hub.go +++ b/syz-hub/hub.go @@ -6,6 +6,7 @@ package main import ( "flag" "fmt" + "net/http" "strings" "sync" "time" @@ -14,6 +15,7 @@ import ( "github.com/google/syzkaller/pkg/config" "github.com/google/syzkaller/pkg/log" "github.com/google/syzkaller/pkg/rpctype" + "github.com/google/syzkaller/pkg/tool" "github.com/google/syzkaller/syz-hub/state" ) @@ -59,7 +61,8 @@ func main() { hub.keys[mgr.Name] = mgr.Key } - hub.initHTTP(cfg.HTTP) + http.HandleFunc("/", hub.httpSummary) + tool.ServeHTTP(cfg.HTTP) go hub.purgeOldManagers() s, err := rpctype.NewRPCServer(cfg.RPC, "Hub", hub) |
