github.com/tiagovtristao/plz@v13.4.0+incompatible/src/worker/types.go (about) 1 package worker 2 3 // A Request is the message that's sent to a worker indicating that it should start a build. 4 type Request struct { 5 // The label of the rule to build, i.e. //src/worker:worker 6 Rule string `json:"rule"` 7 // Labels applies to this rule. 8 Labels []string `json:"labels"` 9 // The temporary directory to build the target in. 10 TempDir string `json:"temp_dir"` 11 // List of source files to compile 12 Sources []string `json:"srcs"` 13 // Compiler options 14 Options []string `json:"opts"` 15 // True if this message relates to a test. 16 Test bool `json:"test"` 17 } 18 19 // A Response is sent back from the worker on completion. 20 type Response struct { 21 // The label of the rule to build, i.e. //src/worker:worker 22 // Always corresponds to one that was sent out earlier in a request. 23 Rule string `json:"rule"` 24 // True if build succeeded 25 Success bool `json:"success"` 26 // Any messages reported. On failure these should indicate what's gone wrong. 27 Messages []string `json:"messages"` 28 // The contents of the BUILD file that should be assumed for this directory, if it's a parse request. 29 BuildFile string `json:"build_file"` 30 }