{"id":20976196,"url":"https://github.com/realtristan/gopool","last_synced_at":"2026-04-21T08:04:09.558Z","repository":{"id":154421248,"uuid":"632101345","full_name":"realTristan/gopool","owner":"realTristan","description":"Database Connection Pooling and Queue System for Go","archived":false,"fork":false,"pushed_at":"2023-04-28T08:41:36.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T18:27:53.406Z","etag":null,"topics":["connection","database","golang","pool"],"latest_commit_sha":null,"homepage":"https://realtristan.github.io/gopool/","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/realTristan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-24T17:59:17.000Z","updated_at":"2023-08-04T02:51:28.000Z","dependencies_parsed_at":"2024-06-21T17:46:51.288Z","dependency_job_id":"f9d3f9e5-cf11-4f73-a622-c30a1e2d59e1","html_url":"https://github.com/realTristan/gopool","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/realTristan/gopool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fgopool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fgopool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fgopool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fgopool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realTristan","download_url":"https://codeload.github.com/realTristan/gopool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fgopool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32082782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["connection","database","golang","pool"],"created_at":"2024-11-19T04:51:23.174Z","updated_at":"2026-04-21T08:04:09.524Z","avatar_url":"https://github.com/realTristan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gopool ![Stars](https://img.shields.io/github/stars/realTristan/gopool?color=brightgreen) ![Watchers](https://img.shields.io/github/watchers/realTristan/gopool?label=Watchers)\n![image-6](https://user-images.githubusercontent.com/75189508/234116253-eec9af68-66c5-44a4-8c30-cf82dbf936c1.png)\n\n# Example\n```go\npackage main\n\nimport gp \"github.com/realTristan/gopool\"\n\n//\n/*\n\nReplace [any] with your client type\n\n*/\n//\nfunc main() {\n\t// Initialize a pool\n\t// Max pool size of 4\n\tvar pool *gp.Pool[any] = gp.InitPool[any](4)\n\n\t// Initalize a client\n\t// Replace nil with your client\n\tvar client *gp.Client[any] = gp.NewClient(nil)\n\n\t// Add the connection to the pool\n\t// Expire in 10 seconds, -1 for no expiration\n\t// When the connection expires, close the client\n\tpool.Add(client, 10, func(client *gp.Client[any]) {\n\t\t// client.close()\n\t})\n\n\t// Access a connection from the pool\n\tpool.WithConnection(func(conn gp.Connection[any], opts *gp.Options[any]) any {\n\t\t// Use the connection client\n\t\tconn.WithClient(func(client gp.Client[any]) any {\n\t\t\t// await client. (... whatever you're trying to do with your database client)\n\t\t\treturn nil\n\t\t})\n\t\treturn nil\n\t})\n}\n```\n\n# License\nMIT License\n\nCopyright (c) 2023 Tristan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtristan%2Fgopool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtristan%2Fgopool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtristan%2Fgopool/lists"}