MCPcopy
hub / github.com/containerd/containerd / LoadSandbox

Method LoadSandbox

client/sandbox.go:167–177  ·  view source on GitHub ↗

LoadSandbox laods existing sandbox metadata object using the id

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

165
166// LoadSandbox laods existing sandbox metadata object using the id
167func (c *Client) LoadSandbox(ctx context.Context, id string) (Sandbox, error) {
168 sandbox, err := c.SandboxStore().Get(ctx, id)
169 if err != nil {
170 return nil, err
171 }
172
173 return &sandboxClient{
174 client: c,
175 metadata: sandbox,
176 }, nil
177}
178
179// NewSandboxOpts is a sandbox options and extensions to be provided by client
180type NewSandboxOpts func(ctx context.Context, client *Client, sandbox *api.Sandbox) error

Callers 1

sandboxes.goFile · 0.80

Calls 2

SandboxStoreMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected