diff --git a/CHANGELOG.md b/CHANGELOG.md index 22012324..9e21ef6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Most recent version is listed first. ## v0.0.9 - Add password hashing capabilities: https://github.com/komuw/ong/pull/137 - Simplify loadshedding implementation: https://github.com/komuw/ong/pull/138 +- Make automax to be a stand-alone package: https://github.com/komuw/ong/pull/139 ## v0.0.8 - Improve documentation. diff --git a/server/automax/automax.go b/automax/automax.go similarity index 84% rename from server/automax/automax.go rename to automax/automax.go index edd26dfa..a00e82d0 100644 --- a/server/automax/automax.go +++ b/automax/automax.go @@ -8,7 +8,7 @@ type config struct { cpuCgroupV2 string } -// SetMem puts GOMEMLIMIT to match the Linux container memory quota (if any), returning an undo function. +// SetMem puts GOMEMLIMIT to match the linux container memory quota (if any), returning an undo function. // // It is a no-op in environments without a configured memory quota. // @@ -17,7 +17,7 @@ func SetMem(c ...config) func() { return setMem(c...) } -// SetCpu puts GOMAXPROCS to match the Linux container cpu quota (if any), returning an undo function. +// SetCpu puts GOMAXPROCS to match the linux container cpu quota (if any), returning an undo function. // // It is a no-op in environments without a configured cpu quota. // diff --git a/server/automax/automaxcpu.go b/automax/automaxcpu.go similarity index 100% rename from server/automax/automaxcpu.go rename to automax/automaxcpu.go diff --git a/server/automax/automaxcpu_test.go b/automax/automaxcpu_test.go similarity index 100% rename from server/automax/automaxcpu_test.go rename to automax/automaxcpu_test.go diff --git a/server/automax/automaxmem.go b/automax/automaxmem.go similarity index 100% rename from server/automax/automaxmem.go rename to automax/automaxmem.go diff --git a/server/automax/automaxmem_test.go b/automax/automaxmem_test.go similarity index 100% rename from server/automax/automaxmem_test.go rename to automax/automaxmem_test.go diff --git a/server/server.go b/server/server.go index e0133664..4ffc3636 100644 --- a/server/server.go +++ b/server/server.go @@ -13,9 +13,9 @@ import ( "syscall" "time" + "github.com/komuw/ong/automax" ongErrors "github.com/komuw/ong/errors" "github.com/komuw/ong/log" - "github.com/komuw/ong/server/automax" "golang.org/x/sys/unix" // syscall package is deprecated )