You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 12, 2021. It is now read-only.
Code refactoring: extract code from shim related functions from virtcontainers package to shim package
extract basic structure types to "virtcontainers/pkg/types".
For example, the "Cmd", "EnvVar", "Linux Capabilities" structure types in the virtcontainers/pkg/types/sandbox.go file are extracted from the virtcontainers/sandbox.go file as common structure types.
"virtcontainers/shim" package is used to store shim related function code. include ccShim、kataBuiltInShim、kataShim、noopShim
Expected result
Reduce the code coupling of "virtcontainers" package and extract the shim related code to an independent package.
Actual result
1.The shim related function code is extracted to the independent package(virtcontainers/shim).
2."Cmd", "EnvVar", "Linux Capabilities","Process"structure types is extracted to the "virtcontainers/pkg/types" package
3.Shim related unit tests are still in the “virtcontainers” directory(include kata_shim_test.go, noop_shim_test.go, shim_test.go, cc_shim_test.go). If put these unit test files in the "virtcontainers/shim" directory, there will be circular dependencies, so keep these files in the "virtcontainers" directory for the time being.
Description of problem
Code refactoring: extract code from shim related functions from virtcontainers package to shim package
For example, the "Cmd", "EnvVar", "Linux Capabilities" structure types in the virtcontainers/pkg/types/sandbox.go file are extracted from the virtcontainers/sandbox.go file as common structure types.
Expected result
Reduce the code coupling of "virtcontainers" package and extract the shim related code to an independent package.
Actual result
1.The shim related function code is extracted to the independent package(virtcontainers/shim).
2."Cmd", "EnvVar", "Linux Capabilities","Process"structure types is extracted to the "virtcontainers/pkg/types" package
3.Shim related unit tests are still in the “virtcontainers” directory(include kata_shim_test.go, noop_shim_test.go, shim_test.go, cc_shim_test.go). If put these unit test files in the "virtcontainers/shim" directory, there will be circular dependencies, so keep these files in the "virtcontainers" directory for the time being.