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
ba1389de
Commit
ba1389de
authored
Apr 28, 2015
by
Yifan Gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubelet/container: Update the runtime interface.
Make some of them (RunInContainer, ExecInContainer, etc) to have same function signatures as current docker and rkt implementation.
parent
44e71093
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
runtime.go
pkg/kubelet/container/runtime.go
+8
-6
No files found.
pkg/kubelet/container/runtime.go
View file @
ba1389de
...
@@ -54,22 +54,24 @@ type Runtime interface {
...
@@ -54,22 +54,24 @@ type Runtime interface {
KillContainerInPod
(
api
.
Container
,
*
api
.
Pod
)
error
KillContainerInPod
(
api
.
Container
,
*
api
.
Pod
)
error
// GetPodStatus retrieves the status of the pod, including the information of
// GetPodStatus retrieves the status of the pod, including the information of
// all containers in the pod.
// all containers in the pod.
GetPodStatus
(
*
Pod
)
(
api
.
PodStatus
,
error
)
GetPodStatus
(
*
api
.
Pod
)
(
api
.
PodStatus
,
error
)
// GetContainers returns all containers on the node, including those are
// GetContainers returns all containers on the node, including those are
// not managed by kubelet. If 'all' is false, then only running containers
// not managed by kubelet. If 'all' is false, then only running containers
// are returned.
// are returned.
GetContainers
(
all
bool
)
([]
*
Container
,
error
)
GetContainers
(
all
bool
)
([]
*
Container
,
error
)
// TODO(vmarmol): Merge RunInContainer and ExecInContainer.
// TODO(vmarmol): Merge RunInContainer and ExecInContainer.
// Runs the command in the container of the specified pod using nsinit.
// Runs the command in the container of the specified pod using nsinit.
RunInContainer
(
container
api
.
Container
,
pod
*
api
.
Pod
,
cmd
[]
string
)
// TODO(yifan): Use strong type for containerID.
RunInContainer
(
containerID
string
,
cmd
[]
string
)
error
// Runs the command in the container of the specified pod using nsenter.
// Runs the command in the container of the specified pod using nsenter.
// Attaches the processes stdin, stdout, and stderr. Optionally uses a
// Attaches the processes stdin, stdout, and stderr. Optionally uses a
// tty.
// tty.
ExecInContainer
(
container
api
.
Container
,
pod
*
api
.
Pod
,
stdin
io
.
Reader
,
stdout
,
stderr
io
.
WriteCloser
,
tty
bool
)
// TODO(yifan): Use strong type for containerID.
ExecInContainer
(
containerID
string
,
cmd
[]
string
,
stdin
io
.
Reader
,
stdout
,
stderr
io
.
WriteCloser
,
tty
bool
)
error
// Forward the specified port from the specified pod to the stream.
// Forward the specified port from the specified pod to the stream.
PortForward
(
pod
Pod
,
port
uint16
,
stream
io
.
ReadWriteCloser
)
PortForward
(
pod
Pod
,
port
uint16
,
stream
io
.
ReadWriteCloser
)
error
// Pull pulls an image from the network to local storage.
// Pull
Image
pulls an image from the network to local storage.
Pull
(
image
string
)
Pull
Image
(
image
string
)
error
// IsImagePresent checks whether the container image is already in the local storage.
// IsImagePresent checks whether the container image is already in the local storage.
IsImagePresent
(
image
string
)
(
bool
,
error
)
IsImagePresent
(
image
string
)
(
bool
,
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