-
Notifications
You must be signed in to change notification settings - Fork 1
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 key expiration (ttl) #6
Comments
Work started in https://github.com/ashcrow/consuloretcd/tree/ttl Looked quickly at the consul implementation but it wasn't nearly as clear how to make a session expire a key. |
Took a few times through the doc to realize that the session has to be made first and then the key must be created with the session. This seems to work. I'll try to implement it shortly. curl exampleThe following expires the key after 30 seconds. $ curl -H "Content-Type: application/json" -d '{"TTL": "30s", "Behavior": "delete"}' -X PUT http://127.0.0.1:8500/v1/session/create
{ "ID":"ad91aa2d-c562-182f-9938-7a913a32022e"}
$ curl -X PUT -d "test" http://127.0.0.1:8500/v1/kv/test2?acquire=ad91aa2d-c562-182f-9938-7a913a32022e |
689cf0c implementes sessions for TTL in consul. Needs some clean up work but functionality should be there. Waiting on some user testing. |
User testing came back positive. |
Merged in #7 |
A request came in asking to support ttl for keys. Both consultant etcd support ttl but in different ways. A single interface should be created so that switching is seamless.
The text was updated successfully, but these errors were encountered: