From 203a52487c6b16d552f22cab1c6740cfa0d4bb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20J=2E=20=C5=81akis?= Date: Wed, 8 Feb 2017 15:09:03 +0100 Subject: [PATCH] server: Start streaming server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jacek J. Łakis --- server/server.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/server.go b/server/server.go index fce50a68..894ab63e 100644 --- a/server/server.go +++ b/server/server.go @@ -539,6 +539,20 @@ func New(config *Config) (*Server, error) { s.restore() s.cleanupSandboxesOnShutdown() + // Prepare streaming server + streamServerConfig := streaming.DefaultConfig + streamServerConfig.Addr = "0.0.0.0:10101" + s.stream.runtimeServer = s + s.stream.streamServer, err = streaming.NewServer(streamServerConfig, s.stream) + if err != nil { + return nil, fmt.Errorf("unable to create streaming server") + } + + // TODO: Is it should be started somewhere else? + go func() { + s.stream.streamServer.Start(true) + }() + logrus.Debugf("sandboxes: %v", s.state.sandboxes) logrus.Debugf("containers: %v", s.state.containers) return s, nil