{"id":15873619,"url":"https://github.com/tombuildsstuff/golang-windowsprocess","last_synced_at":"2025-04-01T22:28:29.360Z","repository":{"id":60637088,"uuid":"157102296","full_name":"tombuildsstuff/golang-windowsprocess","owner":"tombuildsstuff","description":"A library to support managing Windows Processes from Golang","archived":false,"fork":false,"pushed_at":"2018-11-11T17:31:13.000Z","size":215,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T14:45:38.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tombuildsstuff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-11T17:15:42.000Z","updated_at":"2022-10-02T11:55:16.000Z","dependencies_parsed_at":"2022-10-02T12:40:27.428Z","dependency_job_id":null,"html_url":"https://github.com/tombuildsstuff/golang-windowsprocess","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombuildsstuff%2Fgolang-windowsprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombuildsstuff%2Fgolang-windowsprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombuildsstuff%2Fgolang-windowsprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombuildsstuff%2Fgolang-windowsprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tombuildsstuff","download_url":"https://codeload.github.com/tombuildsstuff/golang-windowsprocess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720139,"owners_count":20822853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T01:04:47.335Z","updated_at":"2025-04-01T22:28:29.340Z","avatar_url":"https://github.com/tombuildsstuff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## golang-windowsprocess\n\nThis library supports managing Windows Processes from Golang.\n\n## Why?\n\nJob Objects are kinda like CGroups but for Windows - allowing you to throttle the CPU/Memory limits for a given pool of processes. This library makes Job Objects usable from Golang.\n\n## Technical Notes\n\nThis is achieved by using [Job Objects](https://docs.microsoft.com/en-us/windows/desktop/ProcThread/job-objects) to assign Limits to a Process. It's planned to support both Memory and CPU limits on a Job Object - however at this time only Memory limits are supported.\n\nOnce a process has been assigned to a given Job Object - it cannot be assigned to another (this'll instead crash the process).\n\nJob Objects can be seen using [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer):\n\n![](process-explorer.png)\n\n## Example Usage\n\n```go\njobObject, err := jobobjects.Create(\"Example\")\nif err != nil {\n    panic(err)\n}\n\nerr = jobObject.ConfigureMemoryLimits(1200, 1200)\nif err != nil {\n    panic(err)\n}\n\nprocessId := 5660\nerr = jobObject.AssignProcess(processId)\nif err != nil {\n    panic(err)\n}\n```\n\n## Licence\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombuildsstuff%2Fgolang-windowsprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftombuildsstuff%2Fgolang-windowsprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombuildsstuff%2Fgolang-windowsprocess/lists"}