2018-12-27 09:56:25 +00:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package satellite
|
|
|
|
|
|
|
|
import (
|
|
|
|
"storj.io/storj/pkg/accounting"
|
|
|
|
"storj.io/storj/pkg/bwagreement"
|
|
|
|
"storj.io/storj/pkg/datarepair/irreparable"
|
|
|
|
"storj.io/storj/pkg/datarepair/queue"
|
2019-01-15 16:08:45 +00:00
|
|
|
"storj.io/storj/pkg/overlay"
|
2018-12-27 09:56:25 +00:00
|
|
|
"storj.io/storj/pkg/statdb"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DB is the master database for the satellite
|
|
|
|
type DB interface {
|
2019-01-02 17:53:27 +00:00
|
|
|
// CreateTables initializes the database
|
|
|
|
CreateTables() error
|
|
|
|
// Close closes the database
|
|
|
|
Close() error
|
|
|
|
|
|
|
|
// BandwidthAgreement returns database for storing bandwidth agreements
|
2018-12-27 09:56:25 +00:00
|
|
|
BandwidthAgreement() bwagreement.DB
|
2019-01-02 17:53:27 +00:00
|
|
|
// StatDB returns database for storing node statistics
|
2018-12-27 09:56:25 +00:00
|
|
|
StatDB() statdb.DB
|
2019-01-02 17:53:27 +00:00
|
|
|
// OverlayCache returns database for caching overlay information
|
2019-01-15 16:08:45 +00:00
|
|
|
OverlayCache() overlay.DB
|
2019-01-02 17:53:27 +00:00
|
|
|
// Accounting returns database for storing information about data use
|
2018-12-27 09:56:25 +00:00
|
|
|
Accounting() accounting.DB
|
2019-01-02 17:53:27 +00:00
|
|
|
// RepairQueue returns queue for segments that need repairing
|
|
|
|
RepairQueue() queue.RepairQueue
|
|
|
|
// Irreparable returns database for failed repairs
|
2018-12-27 09:56:25 +00:00
|
|
|
Irreparable() irreparable.DB
|
|
|
|
}
|