containerd/task_opts_linux.go
Daniel Nephin 081f8c7ce0 oci package passing tests
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-27 16:14:43 -05:00

16 lines
347 B
Go

package containerd
import (
"context"
"github.com/opencontainers/runtime-spec/specs-go"
)
// WithResources sets the provided resources for task updates
func WithResources(resources *specs.LinuxResources) UpdateTaskOpts {
return func(ctx context.Context, client *Client, r *UpdateTaskInfo) error {
r.Resources = resources
return nil
}
}