vault4s
vault4s copied to clipboard
Experimental: Higher level VaultClient
Every function on Vault
accepts the same two parameters, an HTTP client and a base URI. Most require a token, which requires periodic refreshing. That token is sometimes a VaultToken
, sometimes a String
. Sometimes it's first in the second parameter list, sometimes it's last, sometimes it's in the first parameter list.
This provides a VaultClient[F]
algebra that hid the token entirely. The client is obtained as a resource by logging in, which spawns a fiber to keep the token current in a ref. The client transparently manages the token, and revokes it when the resource is disposed. The VaultClient
does not break the existing Vault
functions, and can be thought of as a higher-level access.
👍 I like the VaultClient
idea.
I like the way that the VaultClient
is going being more of a guided operational hand.
Alright. I probably won't make much progress on it the next couple weeks, but that's enough encouragement to keep it in my queue.