mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-12 10:18:35 -07:00
store: normalized config
This commit is contained in:
@@ -22,7 +22,7 @@ func init() {
|
||||
|
||||
type peerStoreDriver struct{}
|
||||
|
||||
func (d *peerStoreDriver) New(storecfg *store.Config) (store.PeerStore, error) {
|
||||
func (d *peerStoreDriver) New(storecfg *store.DriverConfig) (store.PeerStore, error) {
|
||||
cfg, err := newPeerStoreConfig(storecfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -37,8 +37,8 @@ type peerStoreConfig struct {
|
||||
Shards int `yaml:"shards"`
|
||||
}
|
||||
|
||||
func newPeerStoreConfig(storecfg *store.Config) (*peerStoreConfig, error) {
|
||||
bytes, err := yaml.Marshal(storecfg.PeerStoreConfig)
|
||||
func newPeerStoreConfig(storecfg *store.DriverConfig) (*peerStoreConfig, error) {
|
||||
bytes, err := yaml.Marshal(storecfg.Config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user