server: Add streamService to server
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
This commit is contained in:
parent
b75b6f6e4b
commit
70a51fe7f5
1 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue