MCPcopy Index your code
hub / github.com/containerd/containerd / Spec

Method Spec

client/container.go:172–182  ·  view source on GitHub ↗

Spec returns the current OCI specification for the container

(ctx context.Context)

Source from the content-addressed store, hash-verified

170
171// Spec returns the current OCI specification for the container
172func (c *container) Spec(ctx context.Context) (*oci.Spec, error) {
173 r, err := c.get(ctx)
174 if err != nil {
175 return nil, err
176 }
177 var s oci.Spec
178 if err := json.Unmarshal(r.Spec.GetValue(), &s); err != nil {
179 return nil, err
180 }
181 return &s, nil
182}
183
184// Delete deletes an existing container
185// an error is returned if the container has running tasks

Callers 1

handleMountsMethod · 0.95

Calls 3

getMethod · 0.95
UnmarshalMethod · 0.80
GetValueMethod · 0.80

Tested by

no test coverage detected