Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compound keys #68

Open
tredeske opened this issue Oct 26, 2022 · 0 comments
Open

Support compound keys #68

tredeske opened this issue Oct 26, 2022 · 0 comments

Comments

@tredeske
Copy link

We would like to use struct keys, but do not need a general "supports all structs" approach being asked for in #53 . We can chain hashmaps together, but that is not a good solution for us.

In particular, we were wondering if a few new key types could be added.

type Key128 struct {
    One, Two uint64
}

This would be generally useful for a number of things such as IPv6 address lookups.

These next two would be useful for IPv6 + some other tuple information or two IPv6 addresses.

type Key192 struct {
    One, Two, Three uint64
}

type Key256 struct {
    One, Two, Three, Four uint64
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant