Add documentation for functions and types.

This commit is contained in:
Dave Collins 2013-05-31 15:19:34 -05:00
parent 8d8fdf4fc1
commit 10d981974c
2 changed files with 7 additions and 0 deletions

6
db.go
View file

@ -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
View file

@ -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
} }