-
Notifications
You must be signed in to change notification settings - Fork 214
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
Simple client to view records of tables via Txn #57
Conversation
|
||
import ( | ||
"github.com/gin-gonic/gin" | ||
"github.com/manhdaovan/go-memdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: need changing to "github.com/hashicorp/go-memdb"
after merged.
package main | ||
|
||
import ( | ||
"github.com/manhdaovan/go-memdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: need changing to "github.com/hashicorp/go-memdb"
after merged.
@manhdaovan @armon @dadgar et all - Any chance of revisiting this? It would be a hugely helpful feature for a project I'm working on :) |
Thank you @manhdaovan for all of your work on this! And thank you @salaxander for your interest! I think this is a really cool idea. Being able to explore the tables and indexes in a memdb would be a really useful. Unfortunately I don't think this is something we can maintain as part of I'd like to propose the following as a path forward:
I'm happy to help with 2 and 3. I believe currently |
@dnephin Sounds like a good path forward! I'm happy to help out in whatever capacity is needed :) |
Oh, I didnt have a look to this PR for a long time @dnephin @salaxander Btw, as no 2 is already implemented, then this PR is unnecessary anymore. |
As the issue here: #41
I want to add a simple client to view the records of tables in memdb.
The idea is I added a thing called
Explorer
, which can explore data of table with given table name, and a http server to display explored data.To init an
Explorer
, you just need passing an instance ofTxn
struct tomemdb.NewExplorer
method. Then you can use any http server to display records with your own implement.Or you can use
explorer_server.NewServer
to init built-in explorer server.(You need Gin as dependency, and given assets and templates paths to Gin as well)
Please ref to
explorer_example/main.go
for more details.Here are some screenshots:
List all tables:
List records of a table:
In html format:
In json format: