go-ipfs-config: config: profile tests, docs
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Sep 6, 2017 at 13:54 UTC
cb7bc06600af76356c2d75a2b7e60e7216b07253
1 file changed
+12
-12
config/profile.go
+12
-12
@@ -7,7 +7,7 @@ type Profile struct {
7
Unapply Transformer
8
}
9
10
-// Profiles is a map holding configuration transformers
10
+// Profiles is a map holding configuration transformers. Docs are in docs/config.md
11
var Profiles = map[string]*Profile{
12
"server": {
13
Apply: func(c *Config) error {
@@ -65,17 +65,17 @@ var Profiles = map[string]*Profile{
65
},
66
"badgerds": {
67
Apply: func(c *Config) error {
68
- c.Datastore.Spec = map[string]interface{}{
69
- "type": "measure",
70
- "prefix": "badger.datastore",
71
- "child": map[string]interface{}{
72
- "type": "badgerds",
73
- "path": "badgerds",
74
- "syncWrites": true,
75
- },
76
- }
77
- return nil
78
- },
68
+ c.Datastore.Spec = map[string]interface{}{
69
+ "type": "measure",
70
+ "prefix": "badger.datastore",
71
+ "child": map[string]interface{}{
72
+ "type": "badgerds",
73
+ "path": "badgerds",
74
+ "syncWrites": true,
75
+ },
76
+ }
77
+ return nil
78
+ },
79
Unapply: func(c *Config) error {
80
c.Datastore.Spec = DefaultDatastoreConfig().Spec
81
return nil