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

Add API function to fetch session metadata #2003

Open
JonasVerhofste opened this issue Nov 1, 2024 · 0 comments
Open

Add API function to fetch session metadata #2003

JonasVerhofste opened this issue Nov 1, 2024 · 0 comments

Comments

@JonasVerhofste
Copy link

Consul-template allows fetching the contents of a KV through the key function, but as far as I can tell there is no way to get the metadata from an associated session.
It would be nice to have a function that gets the metadata of a session coupled to a KV entry (e.g. {{ session "my/kv/path" }}) in a way like the service function exposes things.

Useful information in session metadata includes the NodeID of the node holding the session, and service health check ID's. These can be re-used with the node and service functions respectively.

Relevant api docs:
https://developer.hashicorp.com/consul/api-docs/kv
https://developer.hashicorp.com/consul/api-docs/session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant