From 70a51fe7f574f9807371f6b201a6f3e9f5196e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20J=2E=20=C5=81akis?= Date: Wed, 8 Feb 2017 14:56:20 +0100 Subject: [PATCH] server: Add streamService to 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/server.go b/server/server.go index f74d6c4f..fce50a68 100644 --- a/server/server.go +++ b/server/server.go @@ -21,6 +21,7 @@ import ( rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/selinux/go-selinux/label" pb "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" + "k8s.io/kubernetes/pkg/kubelet/server/streaming" ) const ( @@ -28,6 +29,13 @@ const ( shutdownFile = "/var/lib/ocid/ocid.shutdown" ) +// streamService implements streaming.Runtime. +type streamService struct { + runtimeServer *Server // needed by Exec() endpoint + streamServer streaming.Server + streaming.Runtime +} + // Server implements the RuntimeService and ImageService type Server struct { config Config @@ -50,6 +58,8 @@ type Server struct { appArmorEnabled bool appArmorProfile string + + stream streamService } func (s *Server) loadContainer(id string) error {