sandbox: store endpoint in cri sandboxStore

Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
Abel Feng
2024-02-02 10:59:31 +08:00
parent f6e0cf1894
commit b1fefccc78
8 changed files with 74 additions and 9 deletions

View File

@@ -47,6 +47,18 @@ type Sandbox struct {
*store.StopCh
// Stats contains (mutable) stats for the (pause) sandbox container
Stats *stats.ContainerStats
// Endpoint is the sandbox endpoint, for task or streaming api connection
Endpoint Endpoint
}
type Endpoint struct {
Address string
Protocol string
Version uint32
}
func (e *Endpoint) IsValid() bool {
return e.Protocol != "" && e.Address != ""
}
// NewSandbox creates an internally used sandbox type. This functions reminds