cmd/osbuild-worker-executor: import verbatim from mvo5/oaas
This commit imports the repository https://github.com/mvo5/oaas without keeping the history. The history is largely unimportant and can be looked up in https://github.com/mvo5/oaas/commits/main if needed.
This commit is contained in:
parent
fa416e4545
commit
372d9f07dd
12 changed files with 1024 additions and 0 deletions
25
cmd/osbuild-worker-executor/config.go
Normal file
25
cmd/osbuild-worker-executor/config.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Host string
|
||||
Port string
|
||||
|
||||
BuildDirBase string
|
||||
}
|
||||
|
||||
func newConfigFromCmdline(args []string) (*Config, error) {
|
||||
var config Config
|
||||
|
||||
fs := flag.NewFlagSet("oaas", flag.ContinueOnError)
|
||||
fs.StringVar(&config.Host, "host", "localhost", "host to listen on")
|
||||
fs.StringVar(&config.Port, "port", "8001", "port to listen on")
|
||||
fs.StringVar(&config.BuildDirBase, "build-path", "/var/tmp/oaas", "base dir to run the builds in")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &config, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue