...

Source file src/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go

Documentation: github.com/opencontainers/runc/libcontainer/cgroups/fs

     1  package fs
     2  
     3  import (
     4  	"github.com/opencontainers/runc/libcontainer/cgroups"
     5  	"github.com/opencontainers/runc/libcontainer/configs"
     6  )
     7  
     8  type NetPrioGroup struct{}
     9  
    10  func (s *NetPrioGroup) Name() string {
    11  	return "net_prio"
    12  }
    13  
    14  func (s *NetPrioGroup) Apply(path string, _ *configs.Resources, pid int) error {
    15  	return apply(path, pid)
    16  }
    17  
    18  func (s *NetPrioGroup) Set(path string, r *configs.Resources) error {
    19  	for _, prioMap := range r.NetPrioIfpriomap {
    20  		if err := cgroups.WriteFile(path, "net_prio.ifpriomap", prioMap.CgroupString()); err != nil {
    21  			return err
    22  		}
    23  	}
    24  
    25  	return nil
    26  }
    27  
    28  func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error {
    29  	return nil
    30  }
    31  

View as plain text