mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 06:47:51 +08:00
go-ipfs-config: config: profile tests, docs
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
parent
3de82a7c54
commit
cb7bc06600
@ -7,7 +7,7 @@ type Profile struct {
|
||||
Unapply Transformer
|
||||
}
|
||||
|
||||
// Profiles is a map holding configuration transformers
|
||||
// Profiles is a map holding configuration transformers. Docs are in docs/config.md
|
||||
var Profiles = map[string]*Profile{
|
||||
"server": {
|
||||
Apply: func(c *Config) error {
|
||||
@ -65,17 +65,17 @@ var Profiles = map[string]*Profile{
|
||||
},
|
||||
"badgerds": {
|
||||
Apply: func(c *Config) error {
|
||||
c.Datastore.Spec = map[string]interface{}{
|
||||
"type": "measure",
|
||||
"prefix": "badger.datastore",
|
||||
"child": map[string]interface{}{
|
||||
"type": "badgerds",
|
||||
"path": "badgerds",
|
||||
"syncWrites": true,
|
||||
},
|
||||
}
|
||||
return nil
|
||||
},
|
||||
c.Datastore.Spec = map[string]interface{}{
|
||||
"type": "measure",
|
||||
"prefix": "badger.datastore",
|
||||
"child": map[string]interface{}{
|
||||
"type": "badgerds",
|
||||
"path": "badgerds",
|
||||
"syncWrites": true,
|
||||
},
|
||||
}
|
||||
return nil
|
||||
},
|
||||
Unapply: func(c *Config) error {
|
||||
c.Datastore.Spec = DefaultDatastoreConfig().Spec
|
||||
return nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user