clouadpi: NewServer: move awsBucket parameter to a new ServerConfig struct

We will have more parameters soon so let's make this prettier sooner rather
than later.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2022-03-03 14:22:52 +01:00 committed by Ondřej Budai
parent 2765d2d9a8
commit 9feb7b59d6
4 changed files with 24 additions and 13 deletions

View file

@ -13,9 +13,9 @@ type Server struct {
v2 *v2.Server
}
func NewServer(workers *worker.Server, distros *distroregistry.Registry, awsBucket string) *Server {
func NewServer(workers *worker.Server, distros *distroregistry.Registry, config v2.ServerConfig) *Server {
server := &Server{
v2: v2.NewServer(workers, distros, awsBucket),
v2: v2.NewServer(workers, distros, config),
}
return server
}