gotosocial/vendor/codeberg.org/gruf/go-structr
2025-03-12 20:33:35 +00:00
..
cache.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
index.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
item.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
key.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
LICENSE [performance] overhaul struct (+ result) caching library for simplicity, performance and multiple-result lookups (#2535) 2024-01-19 12:57:29 +00:00
list.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
map.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
queue.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
queue_ctx.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
README.md update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
runtime.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
timeline.go update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
TODO.md update go-structr to v0.9.0 with new Timeline{} cache type (#3903) 2025-03-12 20:33:35 +00:00
util.go update go-structr to v0.8.11 (#3380) 2024-10-02 10:58:20 +00:00

go-structr

A library with a series of performant data types with automated struct value indexing. Indexing is supported via arbitrary combinations of fields, and in the case of the cache type, negative results (errors!) are also supported.

Under the hood, go-structr maintains a hashmap per index, where each hashmap is a hashmap keyed by serialized input key type. This is handled by the incredibly performant serialization library go-mangler, which at this point in time supports most arbitrary types (other than maps, channels, functions), so feel free to index by by almost anything!

See the docs for more API information.

Notes

This is a core underpinning of GoToSocial's performance.