go-ipfs-config: init: lowpower profile

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera 2017-08-20 17:57:00 +02:00
parent efb99b5e59
commit 8d8b02b797
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
package config
type Discovery struct {
MDNS MDNS
MDNS MDNS
//Routing sets default daemon routing mode.
Routing string

View File

@ -73,6 +73,11 @@ var Profiles = map[string]Transformer{
c.Datastore.Spec = DefaultDatastoreConfig().Spec
return nil
},
"lowpower": func(c *Config) error {
c.Discovery.Routing = "dhtclient"
c.Reprovider.Interval = "0"
return nil
},
}
func appendSingle(a []string, b []string) []string {