{"id":22753096,"url":"https://github.com/vedranvuk/container","last_synced_at":"2025-07-28T23:08:56.204Z","repository":{"id":57529063,"uuid":"255602978","full_name":"vedranvuk/container","owner":"vedranvuk","description":"Various containers and datastructures.","archived":false,"fork":false,"pushed_at":"2020-06-08T13:07:56.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T07:17:40.614Z","etag":null,"topics":["datastructures","fifo","golang","queue"],"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/vedranvuk.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}},"created_at":"2020-04-14T12:28:20.000Z","updated_at":"2025-02-23T17:36:09.000Z","dependencies_parsed_at":"2022-08-28T11:12:37.540Z","dependency_job_id":null,"html_url":"https://github.com/vedranvuk/container","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vedranvuk/container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedranvuk%2Fcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedranvuk%2Fcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedranvuk%2Fcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedranvuk%2Fcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vedranvuk","download_url":"https://codeload.github.com/vedranvuk/container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedranvuk%2Fcontainer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267600340,"owners_count":24113765,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["datastructures","fifo","golang","queue"],"created_at":"2024-12-11T06:08:56.513Z","updated_at":"2025-07-28T23:08:56.184Z","avatar_url":"https://github.com/vedranvuk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container\n\nWARNING: Work in progress. APIs might change but tags will be added to discern versions if it does. If using in production, please use vendoring or repackage into your own package.\n\n## Description\n\n\nVarious containers and datastructures.\n\n* queue\n  * fifo: First-In-First-Out queue.\n  * ttl: Timeout list of items with Time To Live.\n\n\n## fifo\n\nA singly linked concurency safe first in first out list with Push, Pop, Peek and Remove operations.\n\n## ttl\n\nA doubly linked concurency safe list with item specific timeouts using an additional map for fast item access. Insert positions sorted by item timeout timestamps are done starting from end of list by default from presumption list will serve for session tracking with all sessions having same timeouts.\n\n## Benchmarks\n\n### fifo\n\nAn i5 skylake lap with 8GB RAM.\n\n```\npkg: github.com/vedranvuk/container/queue/fifo\nBenchmarkQueuePush\nBenchmarkQueuePush-4             7219392               185 ns/op\nBenchmarkQueuePop\nBenchmarkQueuePop-4             55198738                20.5 ns/op\nBenchmarkQueuePeek\nBenchmarkQueuePeek-4            64719546                18.5 ns/op\nBenchmarkQueueRemoveFirst\nBenchmarkQueueRemoveFirst-4      3925570               310 ns/op\nBenchmarkQueueRemoveLast\nBenchmarkQueueRemoveLast-4         49438            117964 ns/op\nBenchmarkQueueRemoveRandom\nBenchmarkQueueRemoveRandom-4       84730            130831 ns/op\n```\n\n### ttl\n\nAverage times with 0 .. 1s random timeouts.\n\n```\npkg: github.com/vedranvuk/container/queue/ttl\nBenchmarkTTLAdd\nBenchmarkTTLAdd-4                2275051               523 ns/op\nBenchmarkTTLRemove\nBenchmarkTTLRemove-4             8822643               119 ns/op\nBenchmarkTTLRemoveReverse\nBenchmarkTTLRemoveReverse-4     34743085                29.8 ns/op\nBenchmarkTTLReset\nBenchmarkTTLReset-4              6620694               155 ns/op\nBenchmarkTTLResetReverse\nBenchmarkTTLResetReverse-4       6337597               182 ns/op\n```\n\n## License\n\nMIT. See incliuded LICENSE file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedranvuk%2Fcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedranvuk%2Fcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedranvuk%2Fcontainer/lists"}