From 690f23b6da2dfb2e4aa8c75993bec09f8902e165 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Tue, 9 Jul 2019 16:28:21 +0200 Subject: [PATCH] Orchestrate ApiServerPreRun runners on monolith --- monolith/monolith.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/monolith/monolith.go b/monolith/monolith.go index 4cfcf7f2d..f05c9e119 100644 --- a/monolith/monolith.go +++ b/monolith/monolith.go @@ -45,6 +45,15 @@ func Configure() *cli.Config { }, }, + ApiServerPreRun: cli.Runners{ + func(ctx context.Context, cmd *cobra.Command, c *cli.Config) (err error) { + cli.HandleError(cmp.ApiServerPreRun.Run(ctx, cmd, cmp)) + cli.HandleError(msg.ApiServerPreRun.Run(ctx, cmd, msg)) + cli.HandleError(sys.ApiServerPreRun.Run(ctx, cmd, sys)) + return + }, + }, + ApiServerRoutes: cli.Mounters{ func(r chi.Router) { r.Route("/compose", cmp.ApiServerRoutes.MountRoutes)