server: Add streamService to server

Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
This commit is contained in:
Jacek J. Łakis 2017-02-08 14:56:20 +01:00 committed by Samuel Ortiz
parent b75b6f6e4b
commit 70a51fe7f5

View file

@ -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 {