worker: rename API to Server

This makes it symmetric with the client:

    s := worker.NewServer()
    c := worker.NewClient()
This commit is contained in:
Lars Karlitski 2020-04-15 23:29:07 +02:00 committed by Tom Gundersen
parent ac40b0e73b
commit 4a710429de
3 changed files with 34 additions and 34 deletions

View file

@ -117,11 +117,11 @@ func main() {
store := store.New(&stateDir)
jobAPI := worker.New(logger, store)
workerAPI := worker.NewServer(logger, store)
weldrAPI := weldr.New(rpm, arch, distribution, repoMap[common.CurrentArch()], logger, store)
go func() {
err := jobAPI.Serve(jobListener)
err := workerAPI.Serve(jobListener)
common.PanicOnError(err)
}()
@ -157,7 +157,7 @@ func main() {
listener := tls.NewListener(listener, tlsConfig)
go func() {
err := jobAPI.Serve(listener)
err := workerAPI.Serve(listener)
common.PanicOnError(err)
}()
}