dashapi

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

package dashapi defines data structures used in dashboard communication and provides client interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(client, addr, key, method string, ctor RequestCtor, doer RequestDoer, req, reply interface{}) error

Types

type BugReport

type BugReport struct {
	Config       []byte
	ID           string
	ExtID        string // arbitrary reporting ID forwarded from BugUpdate.ExtID
	First        bool   // Set for first report for this bug.
	Title        string
	Maintainers  []string
	CC           []string // additional CC emails
	OS           string
	Arch         string
	VMArch       string
	CompilerID   string
	KernelRepo   string
	KernelBranch string
	KernelCommit string
	KernelConfig []byte
	Log          []byte
	Report       []byte
	ReproC       []byte
	ReproSyz     []byte
}

BugReport describes a single bug. Used by dashboard external reporting.

type BugStatus

type BugStatus int
const (
	BugStatusOpen BugStatus = iota
	BugStatusUpstream
	BugStatusInvalid
	BugStatusDup
	BugStatusUpdate // aux info update (i.e. ExtID/Link/CC)
)

type BugUpdate

type BugUpdate struct {
	ID         string
	ExtID      string
	Link       string
	Status     BugStatus
	ReproLevel ReproLevel
	DupOf      string
	FixCommits []string // Titles of commits that fix this bug.
	CC         []string // Additional emails to add to CC list in future emails.
}

type BugUpdateReply

type BugUpdateReply struct {
	OK   bool
	Text string
}

type Build

type Build struct {
	Manager         string
	ID              string
	OS              string
	Arch            string
	VMArch          string
	SyzkallerCommit string
	CompilerID      string
	KernelRepo      string
	KernelBranch    string
	KernelCommit    string
	KernelConfig    []byte
	Commits         []string // see BuilderPoll
}

Build describes all aspects of a kernel build.

type BuilderPollReq

type BuilderPollReq struct {
	Manager string
}

type BuilderPollResp

type BuilderPollResp struct {
	PendingCommits []string
}

type Crash

type Crash struct {
	BuildID     string // refers to Build.ID
	Title       string
	Maintainers []string
	Log         []byte
	Report      []byte
	// The following is optional and is filled only after repro.
	ReproOpts []byte
	ReproSyz  []byte
	ReproC    []byte
}

Crash describes a single kernel crash (potentially with repro).

type CrashID

type CrashID struct {
	BuildID string
	Title   string
}

CrashID is a short summary of a crash for repro queires.

type Dashboard

type Dashboard struct {
	Client string
	Addr   string
	Key    string
}

func New

func New(client, addr, key string) *Dashboard

func (*Dashboard) BuilderPoll

func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error)

func (*Dashboard) LogError

func (dash *Dashboard) LogError(name, msg string, args ...interface{})

Centralized logging on dashboard.

func (*Dashboard) NeedRepro

func (dash *Dashboard) NeedRepro(crash *CrashID) (bool, error)

NeedRepro checks if dashboard needs a repro for this crash or not.

func (*Dashboard) ReportCrash

func (dash *Dashboard) ReportCrash(crash *Crash) (*ReportCrashResp, error)

func (*Dashboard) ReportFailedRepro

func (dash *Dashboard) ReportFailedRepro(crash *CrashID) error

ReportFailedRepro notifies dashboard about a failed repro attempt for the crash.

func (*Dashboard) UploadBuild

func (dash *Dashboard) UploadBuild(build *Build) error

type LogEntry

type LogEntry struct {
	Name string
	Text string
}

type NeedReproResp

type NeedReproResp struct {
	NeedRepro bool
}

type PollRequest

type PollRequest struct {
	Type string
}

type PollResponse

type PollResponse struct {
	Reports []*BugReport
}

type ReportCrashResp

type ReportCrashResp struct {
	NeedRepro bool
}

type ReproLevel

type ReproLevel int
const (
	ReproLevelNone ReproLevel = iota
	ReproLevelSyz
	ReproLevelC
)

type RequestCtor

type RequestCtor func(method, url string, body io.Reader) (*http.Request, error)

type RequestDoer

type RequestDoer func(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL