|
Ran
|
Jobs
1
|
Files
30
|
Run time
3s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/ipfs/ipfs-cluster/commit/<a class=hub.com/ipfs/ipfs-cluster/commit/d06c185fd1178ad5009fbbeef5239fe5c6e072de">d06c185fd<a href="https://github.com/ipfs/ipfs-cluster/commit/d06c185fd1178ad5009fbbeef5239fe5c6e072de">">Issue #162: Rework configuration format The following commit reimplements ipfs-cluster configuration under the following premises: * Each component is initialized with a configuration object defined by its module * Each component decides how the JSON representation of its configuration looks like * Each component parses and validates its own configuration * Each component exposes its own defaults * Component configurations are make the sections of a central JSON configuration file (which replaces the current JSON format) * Component configurations implement a common interface (config.ComponentConfig) with a set of common operations * The central configuration file is managed by a config.ConfigManager which: * Registers ComponentConfigs * Assigns the correspondent sections from the JSON file to each component and delegates the parsing * Delegates the JSON generation for each section * Can be notified when the configuration is updated and must be saved to disk The new service.json would then look as follows: ```json { &quot;cluster&quot;: { &quot;id&quot;: &quot;QmTVW8NoRxC5wBhV7WtAYtRn7itipEESfozWN5KmXUQnk2&quot;, &quot;private_key&quot;: &quot;<...>", "cluster_secret": "</a><a class="double-link" href="https://github.com/ipfs/ipfs-cluster/commit/<a class="double-link" href="https://github.com/ipfs/ipfs-cluster/commit/00224102ae6aaf94f2606abf69a0e278251ecc1d">00224102a</a>">00224102a</a><a href="https://github.com/ipfs/ipfs-cluster/commit/d06c185fd1178ad5009fbbeef5239fe5c6e072de">64815b617ff19d6d2841f786", "cluster_peers": [], "bootstrap": [], "leave_on_shutdown": false, "listen_multiaddress": "/ip4/0.0.0.0/tcp/9096", "state_sync_interval": "1m0s", "ipfs_sync_interval": "2m10s", "replication_factor": -1, "monitor_... (continued)
754 of 754 new or added lines in 18 files covered. (100.0%)
3113 of 4541 relevant lines covered (68.55%)
182.5 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 113 |
100.0 |
api/rest/config.go | |
| 80 |
100.0 |
ipfsconn/ipfshttp/config.go | |
| 70 |
100.0 |
consensus/raft/config.go | |
| 42 |
100.0 |
cluster_config.go | |
| 39 |
100.0 |
informer/disk/config.go | |
| 26 |
100.0 |
monitor/basic/config.go | |
| 25 |
100.0 |
informer/numpin/config.go | |
| 4 |
100.0 |
cluster.go | |
| 2 |
100.0 |
consensus/raft/logging.go | |
| 2 |
100.0 |
consensus/raft/raft.go | |
| 1 |
100.0 |
api/rest/restapi.go |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 730.1 | 0 |
68.55 |
Travis Job 730.1 |