server: Start streaming server
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
This commit is contained in:
parent
70a51fe7f5
commit
203a52487c
1 changed files with 14 additions and 0 deletions
|
@ -539,6 +539,20 @@ func New(config *Config) (*Server, error) {
|
||||||
s.restore()
|
s.restore()
|
||||||
s.cleanupSandboxesOnShutdown()
|
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("sandboxes: %v", s.state.sandboxes)
|
||||||
logrus.Debugf("containers: %v", s.state.containers)
|
logrus.Debugf("containers: %v", s.state.containers)
|
||||||
return s, nil
|
return s, nil
|
||||||
|
|
Loading…
Reference in a new issue