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

Driver information #53

Closed
pi0 opened this issue May 11, 2022 · 5 comments · Fixed by #167
Closed

Driver information #53

pi0 opened this issue May 11, 2022 · 5 comments · Fixed by #167

Comments

@pi0
Copy link
Member

pi0 commented May 11, 2022

A new function to return driver status

@harlan-zw
Copy link
Contributor

harlan-zw commented Feb 11, 2023

The API is limited relative to what some of the drivers are capable of. This can be pretty limiting for users who need to do something bespoke. For example Redis's INCR, SADD, SETBIT.

Being able to access the driver directly would be really handy as an escape hatch. (not sure if this issue is just for driver info or driver access itself).

I think to implement this, being able to see the driver name as a string would be handy also.

const storage = createStorage()
storage.mount('/redis', redisDriver({
    base: "/redis:",
}))

// ...


const driver = storage.getDriver('/redis')
//  {
//    name: 'redis',
//    driver: Redis
// }

Would you be open to a PR on the above?

@pi0
Copy link
Member Author

pi0 commented Feb 13, 2023

We could support it as { dirver } = storage.getMount('/redis') to allow forward compatibility with more information mount. wyt?

@harlan-zw
Copy link
Contributor

harlan-zw commented Feb 14, 2023

We could support it as { dirver } = storage.getMount('/redis') to allow forward compatibility with more information mount. wyt?

driver*

lgtm!

Copy link
Member

atinux commented Feb 27, 2023

It would be nice also to list all the mounts too!

@pi0
Copy link
Member Author

pi0 commented Feb 27, 2023

#52

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

Successfully merging a pull request may close this issue.

3 participants