github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/edge/pkg/edged/containers/helpers.go (about) 1 /* 2 Copyright 2015 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 16 @CHANGELOG 17 KubeEdge Authors: To create mini-kubelet for edge deployment scenario, 18 This file is derived from K8S Kubelet code with pruned structures and interfaces 19 and changed most of the realization. 20 Changes done are 21 1. Some helper functions are derived from k8s.io\kubernetes\pkg\kubelet\dockershim\helpers.go 22 */ 23 24 package containers 25 26 import ( 27 "time" 28 29 kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" 30 ) 31 32 //KubeSourcesReady is blank structure just for function referencing 33 type KubeSourcesReady struct{} 34 35 //AllReady give ready state of Kube Sources 36 func (s *KubeSourcesReady) AllReady() bool { 37 return true 38 } 39 40 type containerRunner struct { 41 } 42 43 func (c *containerRunner) RunInContainer(id kubecontainer.ContainerID, cmd []string, timeout time.Duration) ([]byte, error) { 44 return nil, nil 45 } 46 47 //NewContainerRunner returns container manager object 48 // TODO: we didn't realized Run In container interface yet 49 func NewContainerRunner() kubecontainer.ContainerCommandRunner { 50 return &containerRunner{} 51 }