Skip to content

Commit

Permalink
Merge pull request containerd#1 from ianwoolf/update_example
Browse files Browse the repository at this point in the history
update example
  • Loading branch information
crosbymichael committed Dec 20, 2016
2 parents 5aecba8 + aab3ce7 commit f8b73eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
var shares = uint64(100)

func demoCgroups() error {
control, err := cgroups.New(cgroups.Systemd, cgroups.Slice("system.slice", "runc-test"), &specs.Resources{
CPU: &specs.CPU{
control, err := cgroups.New(cgroups.Systemd, cgroups.Slice("system.slice", "runc-test"), &specs.LinuxResources{
CPU: &specs.LinuxCPU{
Shares: &shares,
},
})
Expand All @@ -22,8 +22,8 @@ func demoCgroups() error {
}
return control.Delete()

control, err = cgroups.New(cgroups.Unified, cgroups.StaticPath("/testv1"), &specs.Resources{
CPU: &specs.CPU{
control, err = cgroups.New(cgroups.Unified, cgroups.StaticPath("/testv1"), &specs.LinuxResources{
CPU: &specs.LinuxCPU{
Shares: &shares,
},
})
Expand Down
2 changes: 1 addition & 1 deletion systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *SystemdController) Name() Name {
return SystemdDbus
}

func (s *SystemdController) Create(path string, resources *specs.Resources) error {
func (s *SystemdController) Create(path string, resources *specs.LinuxResources) error {
slice, name := splitName(path)
properties := []systemdDbus.Property{
systemdDbus.PropDescription(fmt.Sprintf("libcontainer container %s", name)),
Expand Down

0 comments on commit f8b73eb

Please sign in to comment.