Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d9ca9e8c
Commit
d9ca9e8c
authored
Aug 01, 2016
by
k8s-merge-robot
Committed by
GitHub
Aug 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29884 from yujuhong/mv_services
Automatic merge from submit-queue kubelet: move kuberuntime.go to api/services.go
parents
ca6137d4
97e30e13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
3 deletions
+135
-3
services.go
pkg/kubelet/api/services.go
+1
-1
fake_image_service.go
pkg/kubelet/api/testing/fake_image_service.go
+47
-0
fake_runtime_service.go
pkg/kubelet/api/testing/fake_runtime_service.go
+84
-0
docker_service.go
pkg/kubelet/dockershim/docker_service.go
+3
-2
No files found.
pkg/kubelet/
container/kuberuntime
.go
→
pkg/kubelet/
api/services
.go
View file @
d9ca9e8c
...
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package
container
package
api
import
(
"io"
...
...
pkg/kubelet/api/testing/fake_image_service.go
0 → 100644
View file @
d9ca9e8c
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
testing
import
(
"fmt"
internalApi
"k8s.io/kubernetes/pkg/kubelet/api"
runtimeApi
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
)
type
fakeImageService
struct
{
}
func
NewFakeImageService
()
internalApi
.
ImageManagerService
{
return
&
fakeImageService
{}
}
func
(
r
*
fakeImageService
)
ListImages
(
filter
*
runtimeApi
.
ImageFilter
)
([]
*
runtimeApi
.
Image
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeImageService
)
ImageStatus
(
image
*
runtimeApi
.
ImageSpec
)
(
*
runtimeApi
.
Image
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeImageService
)
PullImage
(
image
*
runtimeApi
.
ImageSpec
,
auth
*
runtimeApi
.
AuthConfig
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeImageService
)
RemoveImage
(
image
*
runtimeApi
.
ImageSpec
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
pkg/kubelet/api/testing/fake_runtime_service.go
0 → 100644
View file @
d9ca9e8c
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
testing
import
(
"fmt"
"io"
internalApi
"k8s.io/kubernetes/pkg/kubelet/api"
runtimeApi
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
)
type
fakeRuntimeService
struct
{
}
func
NewFakeRuntimeService
()
internalApi
.
RuntimeService
{
return
&
fakeRuntimeService
{}
}
func
(
r
*
fakeRuntimeService
)
Version
(
apiVersion
string
)
(
*
runtimeApi
.
VersionResponse
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
CreatePodSandbox
(
config
*
runtimeApi
.
PodSandboxConfig
)
(
string
,
error
)
{
return
""
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
StopPodSandbox
(
podSandboxID
string
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
DeletePodSandbox
(
podSandboxID
string
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
PodSandboxStatus
(
podSandboxID
string
)
(
*
runtimeApi
.
PodSandboxStatus
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
ListPodSandbox
(
filter
*
runtimeApi
.
PodSandboxFilter
)
([]
*
runtimeApi
.
PodSandbox
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
CreateContainer
(
podSandboxID
string
,
config
*
runtimeApi
.
ContainerConfig
,
sandboxConfig
*
runtimeApi
.
PodSandboxConfig
)
(
string
,
error
)
{
return
""
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
StartContainer
(
rawContainerID
string
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
StopContainer
(
rawContainerID
string
,
timeout
int64
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
RemoveContainer
(
rawContainerID
string
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
ListContainers
(
filter
*
runtimeApi
.
ContainerFilter
)
([]
*
runtimeApi
.
Container
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
ContainerStatus
(
rawContainerID
string
)
(
*
runtimeApi
.
ContainerStatus
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
}
func
(
r
*
fakeRuntimeService
)
Exec
(
rawContainerID
string
,
cmd
[]
string
,
tty
bool
,
stdin
io
.
Reader
,
stdout
,
stderr
io
.
WriteCloser
)
error
{
return
fmt
.
Errorf
(
"not implemented"
)
}
pkg/kubelet/dockershim/docker_service.go
View file @
d9ca9e8c
...
...
@@ -21,6 +21,7 @@ import (
"io"
"k8s.io/kubernetes/pkg/api"
internalApi
"k8s.io/kubernetes/pkg/kubelet/api"
runtimeApi
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
kubecontainer
"k8s.io/kubernetes/pkg/kubelet/container"
"k8s.io/kubernetes/pkg/kubelet/dockertools"
...
...
@@ -48,8 +49,8 @@ func NewDockerSevice(client dockertools.DockerInterface) DockerLegacyService {
// RuntimeService and ImageService interfaces, while including legacy methods
// for backward compatibility.
type
DockerLegacyService
interface
{
kubecontainer
.
RuntimeService
kubecontainer
.
ImageManagerService
internalApi
.
RuntimeService
internalApi
.
ImageManagerService
// Supporting legacy methods for docker.
GetContainerLogs
(
pod
*
api
.
Pod
,
containerID
kubecontainer
.
ContainerID
,
logOptions
*
api
.
PodLogOptions
,
stdout
,
stderr
io
.
Writer
)
(
err
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment