server: Add infra container store to track them separately
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
b4f9fc8c2c
commit
49c1fd27ac
2 changed files with 39 additions and 4 deletions
|
@ -277,10 +277,18 @@ func (s *Server) addContainer(c *oci.Container) {
|
|||
s.ContainerServer.AddContainer(c)
|
||||
}
|
||||
|
||||
func (s *Server) addInfraContainer(c *oci.Container) {
|
||||
s.ContainerServer.AddInfraContainer(c)
|
||||
}
|
||||
|
||||
func (s *Server) getContainer(id string) *oci.Container {
|
||||
return s.ContainerServer.GetContainer(id)
|
||||
}
|
||||
|
||||
func (s *Server) getInfraContainer(id string) *oci.Container {
|
||||
return s.ContainerServer.GetInfraContainer(id)
|
||||
}
|
||||
|
||||
// GetSandboxContainer returns the infra container for a given sandbox
|
||||
func (s *Server) GetSandboxContainer(id string) *oci.Container {
|
||||
return s.ContainerServer.GetSandboxContainer(id)
|
||||
|
@ -295,6 +303,10 @@ func (s *Server) removeContainer(c *oci.Container) {
|
|||
s.ContainerServer.RemoveContainer(c)
|
||||
}
|
||||
|
||||
func (s *Server) removeInfraContainer(c *oci.Container) {
|
||||
s.ContainerServer.RemoveInfraContainer(c)
|
||||
}
|
||||
|
||||
func (s *Server) getPodSandboxFromRequest(podSandboxID string) (*sandbox.Sandbox, error) {
|
||||
if podSandboxID == "" {
|
||||
return nil, sandbox.ErrIDEmpty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue