{"id":37091693,"url":"https://github.com/ipld/go-selector-store","last_synced_at":"2026-01-14T11:09:47.626Z","repository":{"id":66214175,"uuid":"485850179","full_name":"ipld/go-selector-store","owner":"ipld","description":"A simple store to record selector traversals","archived":true,"fork":false,"pushed_at":"2022-04-27T15:47:29.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-25T09:51:20.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipld.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-26T15:44:24.000Z","updated_at":"2024-05-06T14:13:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3690ebd-4c3a-44db-9ade-7315d4781c37","html_url":"https://github.com/ipld/go-selector-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ipld/go-selector-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-selector-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-selector-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-selector-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-selector-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipld","download_url":"https://codeload.github.com/ipld/go-selector-store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-selector-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-01-14T11:09:47.100Z","updated_at":"2026-01-14T11:09:47.619Z","avatar_url":"https://github.com/ipld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-selector-store\n\n### So far...\n\nI defined a simple interface for a selector store. \n\nAfter several iterations for how to do writing, I settled on a call that takes cid + selector + a linking.BlockReadOpener (i.e. the link loading function) and returns a wrapped link.BlockReadOpener that memoizes the traversal as it loads links, and a commit function that says \"I'm done, write it to the data store\n\nThis seems the most flexible especially since now in go-graphsync we actually do weird stuff like loading additional links in the context of calling the visit function.\n\nThe selector store also has a Has call and a Get call that returns an Iterator you can use to get all the links traversed in a traversal\n\nThe selector store is found in `pkg/types.go`\n\nI wrote a super simple, untested implementation that works on top of go-datastore. For now, I simply make the datastore keys cid.Multihash + dagcbor encoded selector. I encode traversed links in a very simple varint encoded format that cribs some functionality from go-car, though also I wonder if we should make the traversed link just an ipld struct we encode with cbor. \n\nThe simple selector store implementation is in `pkg/simple/simple.go`\n\nNext steps are:\n1. Test the simple implementation and explore optimizations\n2. Looking at storing this data in a more structured way -- one thing that would be super cool if a write for a cid + recursive all selector could serve data for all queries for the all-selector as long as the cid was any cid inside the graph of the first cid + selector combo, for example.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipld%2Fgo-selector-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipld%2Fgo-selector-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipld%2Fgo-selector-store/lists"}