mirror of https://github.com/status-im/consul.git
Update godoc string for memdb wrapper functions/structs
This commit is contained in:
parent
d301145e62
commit
a3028cad89
|
@ -31,8 +31,9 @@ type Changes struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// changeTrackerDB is a thin wrapper around memdb.DB which enables TrackChanges on
|
// changeTrackerDB is a thin wrapper around memdb.DB which enables TrackChanges on
|
||||||
// all write transactions. When the transaction is committed the changes are
|
// all write transactions. When the transaction is committed the changes are:
|
||||||
// sent to the eventPublisher which will create and emit change events.
|
// 1. Used to update our internal usage tracking
|
||||||
|
// 2. Sent to the eventPublisher which will create and emit change events
|
||||||
type changeTrackerDB struct {
|
type changeTrackerDB struct {
|
||||||
db *memdb.MemDB
|
db *memdb.MemDB
|
||||||
publisher eventPublisher
|
publisher eventPublisher
|
||||||
|
@ -100,7 +101,8 @@ func (c *changeTrackerDB) publish(changes Changes) error {
|
||||||
// Restore where we need to replace the entire contents of the Store.
|
// Restore where we need to replace the entire contents of the Store.
|
||||||
// WriteTxnRestore uses a zero index since the whole restore doesn't really
|
// WriteTxnRestore uses a zero index since the whole restore doesn't really
|
||||||
// occur at one index - the effect is to write many values that were previously
|
// occur at one index - the effect is to write many values that were previously
|
||||||
// written across many indexes.
|
// written across many indexes. WriteTxnRestore also does not publish any
|
||||||
|
// change events to subscribers.
|
||||||
func (c *changeTrackerDB) WriteTxnRestore() *txn {
|
func (c *changeTrackerDB) WriteTxnRestore() *txn {
|
||||||
t := &txn{
|
t := &txn{
|
||||||
Txn: c.db.Txn(true),
|
Txn: c.db.Txn(true),
|
||||||
|
|
Loading…
Reference in New Issue