mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
kata-monitor: add getSandboxFS()
Retrieve the absolute sandbox storage path. We will soon need this to monitor the creation/deletion of new kata sandboxes. Signed-off-by: Francesco Giudici <fgiudici@redhat.com>
This commit is contained in:
parent
e38686f74d
commit
afad910d0e
@ -37,6 +37,10 @@ func getSandboxIDFromReq(r *http.Request) (string, error) {
|
|||||||
return "", fmt.Errorf("sandbox not found in %+v", r.URL.Query())
|
return "", fmt.Errorf("sandbox not found in %+v", r.URL.Query())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getSandboxFS() string {
|
||||||
|
return shim.GetSanboxesStoragePath()
|
||||||
|
}
|
||||||
|
|
||||||
// BuildShimClient builds and returns an http client for communicating with the provided sandbox
|
// BuildShimClient builds and returns an http client for communicating with the provided sandbox
|
||||||
func BuildShimClient(sandboxID string, timeout time.Duration) (*http.Client, error) {
|
func BuildShimClient(sandboxID string, timeout time.Duration) (*http.Client, error) {
|
||||||
return buildUnixSocketClient(shim.SocketAddress(sandboxID), timeout)
|
return buildUnixSocketClient(shim.SocketAddress(sandboxID), timeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user