Code Monkey home page Code Monkey logo

Comments (4)

freeekanayaka avatar freeekanayaka commented on May 24, 2024

Yes, this should something we'd want to add. Some simplistic tool written in Go which uses the go-dqlite client and allows to run basic queries shouldn't be to difficult to write.

One other option in the meantime is to use the client.Client.Dump() API to get the content of a database: if you write that to disk you can inspect it using the regular sqlite3 CLI.

from dqlite.

freeekanayaka avatar freeekanayaka commented on May 24, 2024

One slight difficulty is that applications usually are expected to customize the way they expose a dqlite.Node over the network, proxing incoming connections and setting up a custom dial function that performs things like TLS, application-specific authentication, HTTP connection upgrade, etc.

So I'm not sure how to teach this to the CLI tool. Initially the CLI might just support setups were the dqlite.Node is exposed over plain TCP using the default dial function.

from dqlite.

stgraber avatar stgraber commented on May 24, 2024

We have support for this in the demo codebase in go-dqlite and otherwise expect whoever embeds dqlite to make such an interface available should they want to. It's unlikely that we'll be writing a standalone (non-demo) client given that the actual transport used by dqlite is up to the implementor and so the client wouldn't know how to connect.

from dqlite.

freeekanayaka avatar freeekanayaka commented on May 24, 2024

We have support for this in the demo codebase in go-dqlite and otherwise expect whoever embeds dqlite to make such an interface available should they want to. It's unlikely that we'll be writing a standalone (non-demo) client given that the actual transport used by dqlite is up to the implementor and so the client wouldn't know how to connect.

Note that the default CLI sported in the go-dqlite package is actually not the demo program (under cmd/dqlite-demo) but rather an actual non-demo standalone program (under cmd/dqlite). It's true that such default CLI won't work in all cases (for example LXD uses its own transport), but it will work fine if you use the app helper, as it's recommended these days. In that case you can pass to the default CLI the TLS certificate for authenticating.

from dqlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.