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" rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/selinux/go-selinux/label" "github.com/opencontainers/selinux/go-selinux/label"
pb "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" pb "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
"k8s.io/kubernetes/pkg/kubelet/server/streaming"
) )
const ( const (
@ -28,6 +29,13 @@ const (
shutdownFile = "/var/lib/ocid/ocid.shutdown" 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 // Server implements the RuntimeService and ImageService
type Server struct { type Server struct {
config Config config Config
@ -50,6 +58,8 @@ type Server struct {
appArmorEnabled bool appArmorEnabled bool
appArmorProfile string appArmorProfile string
stream streamService
} }
func (s *Server) loadContainer(id string) error { func (s *Server) loadContainer(id string) error {