github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/runc/libcontainer/cgroups/systemd/apply_nosystemd.go (about)

     1  // +build !linux
     2  
     3  package systemd
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/opencontainers/runc/libcontainer/cgroups"
     9  	"github.com/opencontainers/runc/libcontainer/configs"
    10  )
    11  
    12  type Manager struct {
    13  	Cgroups *configs.Cgroup
    14  	Paths   map[string]string
    15  }
    16  
    17  func UseSystemd() bool {
    18  	return false
    19  }
    20  
    21  func (m *Manager) Apply(pid int) error {
    22  	return fmt.Errorf("Systemd not supported")
    23  }
    24  
    25  func (m *Manager) GetPids() ([]int, error) {
    26  	return nil, fmt.Errorf("Systemd not supported")
    27  }
    28  
    29  func (m *Manager) GetAllPids() ([]int, error) {
    30  	return nil, fmt.Errorf("Systemd not supported")
    31  }
    32  
    33  func (m *Manager) Destroy() error {
    34  	return fmt.Errorf("Systemd not supported")
    35  }
    36  
    37  func (m *Manager) GetPaths() map[string]string {
    38  	return nil
    39  }
    40  
    41  func (m *Manager) GetStats() (*cgroups.Stats, error) {
    42  	return nil, fmt.Errorf("Systemd not supported")
    43  }
    44  
    45  func (m *Manager) Set(container *configs.Config) error {
    46  	return nil, fmt.Errorf("Systemd not supported")
    47  }
    48  
    49  func (m *Manager) Freeze(state configs.FreezerState) error {
    50  	return fmt.Errorf("Systemd not supported")
    51  }
    52  
    53  func Freeze(c *configs.Cgroup, state configs.FreezerState) error {
    54  	return fmt.Errorf("Systemd not supported")
    55  }