func (n *NodeTx) RaftNodeAddresses() ([]string, error) {
	return n.query.SelectStrings(n.tx, "SELECT address FROM raft_nodes ORDER BY id")
}
RaftNodeAddresses returns the addresses of all nodes that are members of
the dqlite Raft cluster (possibly including the local node). If this
instance is not running in clustered mode, an empty list is returned.
package db
import (
	"github.com/pkg/errors"
	"github.com/spoke-d/thermionic/internal/db/database"
)
type RaftNode struct {
	ID      int64   
	Address string  
}
type NodeTx struct {
	tx    database.Tx  
	query Query
}
func NewNodeTx(tx database.Tx) *NodeTx {
	return NewNodeTxWithQuery(tx, queryShim{})
}
func NewNodeTxWithQuery(tx database.Tx, query Query) *NodeTx {
	return &NodeTx{
		tx:    tx,
		query: query,
	}
}
func (n *NodeTx) Config() (map[string]string, error) {
	return n.query.SelectConfig(n.tx, "config", "")
}
func (n *NodeTx) UpdateConfig(values map[string]string) error {
	return n.query.UpdateConfig(n.tx, "config", values)
}
func (n *NodeTx) RaftNodes() ([]RaftNode, error) {
	var nodes []RaftNode
	dest := func(i int) []interface{} {
		nodes = append(nodes, RaftNode{})
		return []interface{}{
			&nodes[i].ID,
			&nodes[i].Address,
		}
	}
	err := n.query.SelectObjects(n.tx, dest, "SELECT id, address FROM raft_nodes ORDER BY id")
	return nodes, errors.Wrap(err, "failed to fetch raft nodes")
}