Documentation ¶
Index ¶
- Variables
- type Config
- type DB
- func (db *DB) Bandwidth() bandwidth.DB
- func (db *DB) CertDB() trust.CertDB
- func (db *DB) Close() error
- func (db *DB) CreateTables() error
- func (db *DB) Orders() orders.DB
- func (db *DB) PSDB() *psdb.DB
- func (db *DB) PieceInfo() pieces.DB
- func (db *DB) Pieces() storage.Blobs
- func (db *DB) RoutingTable() (kdb, ndb storage.KeyValueStore)
- func (db *DB) UsedSerials() piecestore.UsedSerials
- type InfoDB
- func (db *InfoDB) Bandwidth() bandwidth.DB
- func (db *InfoDB) Begin() (*sql.Tx, error)
- func (db *InfoDB) CertDB() trust.CertDB
- func (db *InfoDB) Close() error
- func (db *InfoDB) CreateTables(log *zap.Logger) error
- func (db *InfoDB) Migration() *migrate.Migration
- func (db *InfoDB) Orders() orders.DB
- func (db *InfoDB) PieceInfo() pieces.DB
- func (db *InfoDB) RawDB() *sql.DB
- func (db *InfoDB) Rebind(s string) string
- func (db *InfoDB) Schema() string
- func (db *InfoDB) UsedSerials() piecestore.UsedSerials
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInfo = errs.Class("infodb")
ErrInfo is the default error class for InfoDB
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // TODO: figure out better names Storage string Info string Info2 string Kademlia string Pieces string }
Config configures storage node database
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB contains access to different database tables
func NewInMemory ¶
NewInMemory creates new inmemory master database for storage node TODO: still stores data on disk
func (*DB) CreateTables ¶
CreateTables creates any necessary tables.
func (*DB) RoutingTable ¶
func (db *DB) RoutingTable() (kdb, ndb storage.KeyValueStore)
RoutingTable returns kademlia routing table
func (*DB) UsedSerials ¶
func (db *DB) UsedSerials() piecestore.UsedSerials
UsedSerials returns certificate database.
type InfoDB ¶
type InfoDB struct {
// contains filtered or unexported fields
}
InfoDB implements information database for piecestore.
func NewInfoInMemory ¶
NewInfoInMemory creates a new inmemory InfoDB.
func (*InfoDB) CreateTables ¶
CreateTables creates any necessary tables.
func (*InfoDB) UsedSerials ¶
func (db *InfoDB) UsedSerials() piecestore.UsedSerials
UsedSerials returns certificate database.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.