cmd/gitbay-runner/cgroup_other.go

ebf1e30fe0ae09b2d5f93705c1cbf7f513b6ed22
gitbay/cmd/gitbay-runner/cgroup_other.go history · blame · raw

23 lines · 447 bytes

 1//go:build !linux
 2
 3package main
 4
 5import (
 6	"errors"
 7	"os"
 8	"os/exec"
 9)
10
11type buildCgroups struct{}
12
13func prepareBuildCgroups() (*buildCgroups, error) {
14	return nil, errors.New("build cgroups need Linux")
15}
16
17func (c *buildCgroups) create(id int64, memory, cpus string) (string, *os.File, error) {
18	return "", nil, errors.New("build cgroups need Linux")
19}
20
21func (c *buildCgroups) remove(dir string) {}
22
23func intoCgroup(cmd *exec.Cmd, f *os.File) {}