Add Updates.Check field to Config
Peter Borzov committed
Oct 6, 2014 at 15:48 UTC
ecd6f3b00c9a9f69b9c6c5f79bbed01057923337
4 files changed
+10
-1
.gitignore
+2
@@ -1,3 +1,5 @@
1
+cpu.prof # ipfs can generate profiling dump files
2
+
3
*.swp
4
.ipfsconfig
5
*.out
cmd/ipfs/ipfs.go
+2
-1
@@ -67,7 +67,8 @@ var log = u.Logger("cmd/ipfs")
67
func init() {
68
config, err := config.PathRoot()
69
if err != nil {
70
- config = ""
70
+ u.POut("Failure initializing the default Config Directory: ", err)
71
+ os.Exit(1)
72
}
73
CmdIpfs.Flag.String("c", config, "specify config directory")
74
}
config/config.go
+6
@@ -45,12 +45,18 @@ func (bp *BootstrapPeer) String() string {
45
return bp.Address + "/" + bp.PeerID
46
}
47
48
+// Updates regulates checking and downloading for application's most recent version
49
+type Updates struct {
50
+ Check string // "ignore" for do not check, "warn" and "error" for reacting when obsolete
51
+}
52
+
53
// Config is used to load IPFS config files.
54
type Config struct {
55
Identity Identity // local node's peer identity
56
Datastore Datastore // local node's storage
57
Addresses Addresses // local node's addresses
58
Mounts Mounts // local node's mount points
59
+ Updates Updates // local node's version management
60
Bootstrap []*BootstrapPeer // local nodes's bootstrap peers
61
}
62