Skip to content

Commit

Permalink
go-ipfs-config: init: lowpower profile
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
  • Loading branch information
magik6k committed Mar 24, 2018
1 parent efb99b5 commit 8d8b02b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/discovery.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

type Discovery struct {
MDNS MDNS
MDNS MDNS

//Routing sets default daemon routing mode.
Routing string
Expand Down
5 changes: 5 additions & 0 deletions config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8d8b02b

Please sign in to comment.