libkv
libkv copied to clipboard
generic configuration?
I want to implement a new vault backend. The issue is that vault needs a lot of extra configuration that conventional key-value stores don't need.
I think we need to move from a base struct that each backend uses, to a loosely-typed config json that will be unmarshled by the backend itself and not the generic store.
I'll happily do this if you think that's the right move. Thoughts?
Maybe something like docker registry uses to initialize its storage driver? Unmarshal the parameters into a map[string]interface{} and the driver's factory func handles verifying the correct values are provided.
func (f *driverFactory) Create(parameters map[string]interface{}) (storage.Driver, error) {
// ....
}