mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-24 06:47:59 +01:00
Add documentation for functions and types.
This commit is contained in:
parent
8d8fdf4fc1
commit
10d981974c
2 changed files with 7 additions and 0 deletions
6
db.go
6
db.go
|
@ -133,6 +133,8 @@ type Db interface {
|
||||||
Sync()
|
Sync()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BlockIterator defines a generic interface for an iterator through the block
|
||||||
|
// chain.
|
||||||
type BlockIterator interface {
|
type BlockIterator interface {
|
||||||
// Close shuts down the iterator when done walking blocks in the database.
|
// Close shuts down the iterator when done walking blocks in the database.
|
||||||
Close()
|
Close()
|
||||||
|
@ -144,12 +146,16 @@ type BlockIterator interface {
|
||||||
Row() (key *btcwire.ShaHash, pver uint32, buf []byte, err error)
|
Row() (key *btcwire.ShaHash, pver uint32, buf []byte, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DriverDB defines a structure for backend drivers to use when they registered
|
||||||
|
// themselves as a backend which implements the Db interface.
|
||||||
type DriverDB struct {
|
type DriverDB struct {
|
||||||
DbType string
|
DbType string
|
||||||
Create func(argstr string) (pbdb Db, err error)
|
Create func(argstr string) (pbdb Db, err error)
|
||||||
Open func(filepath string) (pbdb Db, err error)
|
Open func(filepath string) (pbdb Db, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TxListReply is used to return individual transaction information when
|
||||||
|
// data about multiple transactions is requested in a single call.
|
||||||
type TxListReply struct {
|
type TxListReply struct {
|
||||||
Sha *btcwire.ShaHash
|
Sha *btcwire.ShaHash
|
||||||
Tx *btcwire.MsgTx
|
Tx *btcwire.MsgTx
|
||||||
|
|
1
log.go
1
log.go
|
@ -51,6 +51,7 @@ func SetLogWriter(w io.Writer) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetLog returns the currently active logger.
|
||||||
func GetLog() seelog.LoggerInterface {
|
func GetLog() seelog.LoggerInterface {
|
||||||
return log
|
return log
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue