mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
e82e582cdf
* add flag to exclude kafka * Add config flag to exclude kafka * Merge branch 'master' into buildtime-exclude-kafka
17 lines
329 B
Go
17 lines
329 B
Go
package db
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/kafka"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/kv"
|
|
)
|
|
|
|
// NewDB initializes a new DB with kafka wrapper.
|
|
func NewDB(dirPath string) (Database, error) {
|
|
db, err := kv.NewKVStore(dirPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return kafka.Wrap(db)
|
|
}
|