2014-05-15 06:21:44 +08:00
|
|
|
// +build !linux
|
|
|
|
|
|
|
|
package systemd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2015-06-22 10:29:59 +08:00
|
|
|
"github.com/opencontainers/runc/libcontainer/cgroups"
|
|
|
|
"github.com/opencontainers/runc/libcontainer/configs"
|
2014-05-15 06:21:44 +08:00
|
|
|
)
|
|
|
|
|
2015-01-13 05:54:00 +08:00
|
|
|
type Manager struct {
|
2015-02-01 11:56:27 +08:00
|
|
|
Cgroups *configs.Cgroup
|
2015-01-14 23:47:26 +08:00
|
|
|
Paths map[string]string
|
2015-01-13 05:54:00 +08:00
|
|
|
}
|
|
|
|
|
2014-05-15 06:21:44 +08:00
|
|
|
func UseSystemd() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2015-01-13 05:54:00 +08:00
|
|
|
func (m *Manager) Apply(pid int) error {
|
|
|
|
return fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Manager) GetPids() ([]int, error) {
|
2014-05-22 04:48:06 +08:00
|
|
|
return nil, fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
|
|
|
|
2015-01-14 23:23:42 +08:00
|
|
|
func (m *Manager) Destroy() error {
|
2015-01-13 05:54:00 +08:00
|
|
|
return fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Manager) GetPaths() map[string]string {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Manager) GetStats() (*cgroups.Stats, error) {
|
2014-05-15 06:21:44 +08:00
|
|
|
return nil, fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
2014-05-31 06:09:07 +08:00
|
|
|
|
2015-02-25 17:20:01 +08:00
|
|
|
func (m *Manager) Set(container *configs.Config) error {
|
|
|
|
return nil, fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
|
|
|
|
2015-02-01 11:56:27 +08:00
|
|
|
func (m *Manager) Freeze(state configs.FreezerState) error {
|
2015-01-13 19:52:14 +08:00
|
|
|
return fmt.Errorf("Systemd not supported")
|
|
|
|
}
|
|
|
|
|
2015-02-01 11:56:27 +08:00
|
|
|
func Freeze(c *configs.Cgroup, state configs.FreezerState) error {
|
2014-05-31 06:09:07 +08:00
|
|
|
return fmt.Errorf("Systemd not supported")
|
|
|
|
}
|