aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-02-17 18:52:07 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-02-17 18:52:07 +0100
commit1466d0cb9f3cfcd088ad7e7e0c8b79b521d129ab (patch)
treef89f0c47aed7d545b9bb6230b9b89a97bf564bef /config
parent104126b97057a9a60c055762dfb1b29ae2b458f5 (diff)
manager: add ability to communicate with dashboard
Manager can send crashes and repros to a dashboard app. Dashboard app is not checked-in yet.
Diffstat (limited to 'config')
-rw-r--r--config/config.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index a0e21dc26..410d9c663 100644
--- a/config/config.go
+++ b/config/config.go
@@ -39,6 +39,9 @@ type Config struct {
Hub_Addr string
Hub_Key string
+ Dashboard_Addr string
+ Dashboard_Key string
+
Syzkaller string // path to syzkaller checkout (syz-manager will look for binaries in bin subdir)
Type string // VM type (qemu, kvm, local)
Count int // number of VMs (don't secify for adb, instead specify devices)
@@ -197,6 +200,23 @@ func parse(data []byte) (*Config, map[int]bool, error) {
return nil, nil, err
}
+ if cfg.Hub_Addr != "" {
+ if cfg.Name == "" {
+ return nil, nil, fmt.Errorf("hub_addr is set, but name is empty")
+ }
+ if cfg.Hub_Key == "" {
+ return nil, nil, fmt.Errorf("hub_addr is set, but hub_key is empty")
+ }
+ }
+ if cfg.Dashboard_Addr != "" {
+ if cfg.Name == "" {
+ return nil, nil, fmt.Errorf("dashboard_addr is set, but name is empty")
+ }
+ if cfg.Dashboard_Key == "" {
+ return nil, nil, fmt.Errorf("dashboard_addr is set, but dashboard_key is empty")
+ }
+ }
+
return cfg, syscalls, nil
}
@@ -332,6 +352,8 @@ func checkUnknownFields(data []byte) (string, error) {
"Output",
"Hub_Addr",
"Hub_Key",
+ "Dashboard_Addr",
+ "Dashboard_Key",
"Syzkaller",
"Type",
"Count",