@@ -697,7 +697,7 @@ func initSystemdProps(spec *specs.Spec) ([]systemdDbus.Property, error) {
697697 return sp , nil
698698}
699699
700- func CreateCgroupConfig (opts * CreateOpts , defaultDevs []* devices.Device ) (* configs .Cgroup , error ) {
700+ func CreateCgroupConfig (opts * CreateOpts , defaultDevs []* devices.Device ) (* cgroups .Cgroup , error ) {
701701 var (
702702 myCgroupPath string
703703
@@ -706,10 +706,10 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi
706706 name = opts .CgroupName
707707 )
708708
709- c := & configs .Cgroup {
709+ c := & cgroups .Cgroup {
710710 Systemd : useSystemdCgroup ,
711711 Rootless : opts .RootlessCgroups ,
712- Resources : & configs .Resources {},
712+ Resources : & cgroups .Resources {},
713713 }
714714
715715 if useSystemdCgroup {
@@ -853,40 +853,40 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi
853853 if wd .LeafWeight != nil {
854854 leafWeight = * wd .LeafWeight
855855 }
856- weightDevice := configs .NewWeightDevice (wd .Major , wd .Minor , weight , leafWeight )
856+ weightDevice := cgroups .NewWeightDevice (wd .Major , wd .Minor , weight , leafWeight )
857857 c .Resources .BlkioWeightDevice = append (c .Resources .BlkioWeightDevice , weightDevice )
858858 }
859859 for _ , td := range r .BlockIO .ThrottleReadBpsDevice {
860860 rate := td .Rate
861- throttleDevice := configs .NewThrottleDevice (td .Major , td .Minor , rate )
861+ throttleDevice := cgroups .NewThrottleDevice (td .Major , td .Minor , rate )
862862 c .Resources .BlkioThrottleReadBpsDevice = append (c .Resources .BlkioThrottleReadBpsDevice , throttleDevice )
863863 }
864864 for _ , td := range r .BlockIO .ThrottleWriteBpsDevice {
865865 rate := td .Rate
866- throttleDevice := configs .NewThrottleDevice (td .Major , td .Minor , rate )
866+ throttleDevice := cgroups .NewThrottleDevice (td .Major , td .Minor , rate )
867867 c .Resources .BlkioThrottleWriteBpsDevice = append (c .Resources .BlkioThrottleWriteBpsDevice , throttleDevice )
868868 }
869869 for _ , td := range r .BlockIO .ThrottleReadIOPSDevice {
870870 rate := td .Rate
871- throttleDevice := configs .NewThrottleDevice (td .Major , td .Minor , rate )
871+ throttleDevice := cgroups .NewThrottleDevice (td .Major , td .Minor , rate )
872872 c .Resources .BlkioThrottleReadIOPSDevice = append (c .Resources .BlkioThrottleReadIOPSDevice , throttleDevice )
873873 }
874874 for _ , td := range r .BlockIO .ThrottleWriteIOPSDevice {
875875 rate := td .Rate
876- throttleDevice := configs .NewThrottleDevice (td .Major , td .Minor , rate )
876+ throttleDevice := cgroups .NewThrottleDevice (td .Major , td .Minor , rate )
877877 c .Resources .BlkioThrottleWriteIOPSDevice = append (c .Resources .BlkioThrottleWriteIOPSDevice , throttleDevice )
878878 }
879879 }
880880 for _ , l := range r .HugepageLimits {
881- c .Resources .HugetlbLimit = append (c .Resources .HugetlbLimit , & configs .HugepageLimit {
881+ c .Resources .HugetlbLimit = append (c .Resources .HugetlbLimit , & cgroups .HugepageLimit {
882882 Pagesize : l .Pagesize ,
883883 Limit : l .Limit ,
884884 })
885885 }
886886 if len (r .Rdma ) > 0 {
887- c .Resources .Rdma = make (map [string ]configs .LinuxRdma , len (r .Rdma ))
887+ c .Resources .Rdma = make (map [string ]cgroups .LinuxRdma , len (r .Rdma ))
888888 for k , v := range r .Rdma {
889- c .Resources .Rdma [k ] = configs .LinuxRdma {
889+ c .Resources .Rdma [k ] = cgroups .LinuxRdma {
890890 HcaHandles : v .HcaHandles ,
891891 HcaObjects : v .HcaObjects ,
892892 }
@@ -897,7 +897,7 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi
897897 c .Resources .NetClsClassid = * r .Network .ClassID
898898 }
899899 for _ , m := range r .Network .Priorities {
900- c .Resources .NetPrioIfpriomap = append (c .Resources .NetPrioIfpriomap , & configs .IfPrioMap {
900+ c .Resources .NetPrioIfpriomap = append (c .Resources .NetPrioIfpriomap , & cgroups .IfPrioMap {
901901 Interface : m .Name ,
902902 Priority : int64 (m .Priority ),
903903 })
0 commit comments