Add first version of createPodSandbox
Signed-off-by: Haiyan Meng <hmeng@redhat.com>
This commit is contained in:
parent
0766dfecfe
commit
819d76b6fd
7 changed files with 361 additions and 23 deletions
|
@ -6,16 +6,19 @@ const (
|
|||
|
||||
// Server implements the RuntimeService and ImageService
|
||||
type Server struct {
|
||||
runtime ociRuntime
|
||||
runtime ociRuntime
|
||||
sandboxDir string
|
||||
sandboxes []*sandbox
|
||||
}
|
||||
|
||||
// New creates a new Server with options provided
|
||||
func New(runtimePath string) (*Server, error) {
|
||||
func New(runtimePath, sandboxDir string) (*Server, error) {
|
||||
// TODO(runcom): runtimePath arg is unused but it might be useful
|
||||
// if we're willing to open the doors to other runtimes in the future.
|
||||
r := &runcRuntime{}
|
||||
return &Server{
|
||||
runtime: r,
|
||||
runtime: r,
|
||||
sandboxDir: sandboxDir,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -50,3 +53,9 @@ func (r *runcRuntime) Version() (string, error) {
|
|||
}
|
||||
return runtimeVersion, nil
|
||||
}
|
||||
|
||||
type sandbox struct {
|
||||
name string
|
||||
logDir string
|
||||
labels map[string]string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue