Spec returns the current OCI specification for the container
(ctx context.Context)
| 170 | |
| 171 | // Spec returns the current OCI specification for the container |
| 172 | func (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 |
no test coverage detected