From 9bf22a3baef51d51618ed82ae439fb3c4af4159d Mon Sep 17 00:00:00 2001 From: kaiyou <dev@kaiyou.fr> Date: Sun, 27 Aug 2023 22:15:21 +0200 Subject: [PATCH] Add temporary infrastructure for running a tcp proxy --- cmd/hepto/service.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/hepto/service.go b/cmd/hepto/service.go index c7a1292..fbeeb6f 100644 --- a/cmd/hepto/service.go +++ b/cmd/hepto/service.go @@ -78,10 +78,20 @@ var Start = &cobra.Command{ }, RunE: func(cmd *cobra.Command, args []string) error { newArgs := append([]string{Run.Use}, os.Args[2:]...) - return selfcontain.RunWithArgs(&config.Container, newArgs) + // This is a hack while waiting for some refactoring in selfcontain + errChan := make(chan error) + go func() { + errChan <- selfcontain.RunWithArgs(&config.Container, newArgs) + }() + go apiserverForward(errChan) + return <-errChan }, } +func apiserverForward(chan error) { + // do nothing for now +} + var Run = &cobra.Command{ Use: "run", Short: "Actually run hepto inside the container", -- GitLab