Can we provide a way to allow users to config storage systems? Is this feature out of the scope?
After this supported, our go-storage could have two planes: data plane vs control plane.
However, the configuration is highly different in different services. It’s not easy to find a good abstraction for them.
We could provide json schemas for different services:
- Use JSON Schema to generate the config key & value
- Build a config SET/GET APIs which accept only
(key string, value byte)
- Service will convert from our bytes into real API request struct
But why user need to config their storage in this way? What’s the benefit?
This could be useful for UI/UX.
- Frontend can generate form via JSON Schema
- Backend can provide SET/GET APIs to frontend
- Service can use JSON Schema to generate struct and unmarshal bytes into it.
This feature should be outside go-storage maybe?