Decouple kubernetes-dependent an non-dependent parts of server
Move non-kubernetes-dependent portions of server struct to libkpod. So far, only the struct fields have been moved and not their dependent functions Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
parent
4d6ff0b414
commit
64ad902480
24 changed files with 153 additions and 100 deletions
|
@ -17,11 +17,11 @@ func (s *Server) ExecSync(ctx context.Context, req *pb.ExecSyncRequest) (*pb.Exe
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if err = s.runtime.UpdateStatus(c); err != nil {
|
||||
if err = s.Runtime().UpdateStatus(c); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cState := s.runtime.ContainerStatus(c)
|
||||
cState := s.Runtime().ContainerStatus(c)
|
||||
if !(cState.Status == oci.ContainerStateRunning || cState.Status == oci.ContainerStateCreated) {
|
||||
return nil, fmt.Errorf("container is not created or running")
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ func (s *Server) ExecSync(ctx context.Context, req *pb.ExecSyncRequest) (*pb.Exe
|
|||
return nil, fmt.Errorf("exec command cannot be empty")
|
||||
}
|
||||
|
||||
execResp, err := s.runtime.ExecSync(c, cmd, req.Timeout)
|
||||
execResp, err := s.Runtime().ExecSync(c, cmd, req.Timeout)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue