doc(config): expand on config value limits
Steven Allen committed
Jun 16, 2020 at 11:10 UTC
c0951e73d725145f9cbcc7f6fed5324723c0eb76
1 file changed
+33
-25
docs/config.md
+33
-25
@@ -216,7 +216,7 @@ Supported Transports:
216
217
Default: `/ip4/127.0.0.1/tcp/5001`
218
219
-Type: `strings`
219
+Type: `strings` (multiaddrs)
220
221
### `Addresses.Gateway`
222
@@ -230,7 +230,7 @@ Supported Transports:
230
231
Default: `/ip4/127.0.0.1/tcp/8080`
232
233
-Type: `strings`
233
+Type: `strings` (multiaddrs)
234
235
### `Addresses.Swarm`
236
@@ -253,7 +253,7 @@ Default:
253
]
254
```
255
256
-Type: `array[string]`
256
+Type: `array[string]` (multiaddrs)
257
258
### `Addresses.Announce`
259
@@ -262,14 +262,14 @@ network. If empty, the daemon will announce inferred swarm addresses.
262
263
Default: `[]`
264
265
-Type: `array[string]`
265
+Type: `array[string]` (multiaddrs)
266
267
### `Addresses.NoAnnounce`
268
Array of swarm addresses not to announce to the network.
269
270
Default: `[]`
271
272
-Type: `array[string]`
272
+Type: `array[string]` (multiaddrs)
273
274
## `API`
275
Contains information used by the API gateway.
@@ -286,7 +286,7 @@ Example:
286
287
Default: `null`
288
289
-Type: `object[string -> array[string]]`
289
+Type: `object[string -> array[string]]` (header names -> array of header values)
290
291
## `AutoNAT`
292
@@ -305,7 +305,7 @@ field can take one of two values:
305
306
Additional modes may be added in the future.
307
308
-Type: `string` (can only be "enabled" and "disabled")
308
+Type: `string` (one of `"enabled"` or `"disabled"`)
309
310
### `AutoNAT.Throttle`
311
@@ -319,7 +319,7 @@ Configures how many AutoNAT requests to service per `AutoNAT.Throttle.Interval`.
319
320
Default: 30
321
322
-Type: `integer`
322
+Type: `integer` (non-negative, `0` means unlimited)
323
324
### `AutoNAT.Throttle.PeerLimit`
325
@@ -327,7 +327,7 @@ Configures how many AutoNAT requests per-peer to service per `AutoNAT.Throttle.I
327
328
Default: 3
329
330
-Type: `integer`
330
+Type: `integer` (non-negative, `0` means unlimited)
331
332
### `AutoNAT.Throttle.Interval`
333
@@ -335,7 +335,7 @@ Configures the interval for the above limits.
335
336
Default: 1 Minute
337
338
-Type: `duration`
338
+Type: `duration` (when `0`/unset, the default value is used)
339
340
## `Bootstrap`
341
@@ -344,7 +344,7 @@ initiate a connection to the network.
344
345
Default: The ipfs.io bootstrap nodes
346
347
-Type: `array[string]`
347
+Type: `array[string]` (multiaddrs)
348
349
## `Datastore`
350
@@ -368,7 +368,7 @@ option defaults to false currently).
368
369
Default: `90`
370
371
-Type: `integer`
371
+Type: `integer` (0-100%)
372
373
### `Datastore.GCPeriod`
374
@@ -377,7 +377,7 @@ if automatic gc is enabled.
377
378
Default: `1h`
379
380
-Type: `duration` or an empty string for the default value.
380
+Type: `duration` (an empty string means the default value)
381
382
### `Datastore.HashOnRead`
383
@@ -406,7 +406,7 @@ are used, so the constant `k` is 7 in the formula.
406
407
Default: `0` (disabled)
408
409
-Type: `integer`
409
+Type: `integer` (non-negative, bytes)
410
411
### `Datastore.Spec`
412
@@ -474,7 +474,9 @@ Type: `bool`
474
475
A number of seconds to wait between discovery checks.
476
477
-Type: `integer` (_not_ a duration)
477
+Default: `5`
478
+
479
+Type: `integer` (integer seconds, 0 means the default)
480
481
## `Gateway`
482
@@ -526,7 +528,7 @@ A url to redirect requests for `/` to.
528
529
Default: `""`
530
529
-Type: `string`
531
+Type: `string` (url)
532
533
### `Gateway.Writable`
534
@@ -729,13 +731,13 @@ The unique PKI identity label for this configs peer. Set on init and never read,
731
it's merely here for convenience. Ipfs will always generate the peerID from its
732
keypair at runtime.
733
732
-Type: `string`
734
+Type: `string` (peer ID)
735
736
### `Identity.PrivKey`
737
738
The base64 encoded protobuf describing (and containing) the nodes private key.
739
738
-Type: `string`
740
+Type: `string` (base64 encoded)
741
742
## `Ipns`
743
@@ -764,7 +766,7 @@ will be kept cached until their lifetime is expired.
766
767
Default: `128`
768
767
-Type: `integer`
769
+Type: `integer` (non-negative, 0 means the default)
770
771
## `Mounts`
772
@@ -776,7 +778,7 @@ Mountpoint for `/ipfs/`.
778
779
Default: `/ipfs`
780
779
-Type: `string`
781
+Type: `string` (filesystem path)
782
783
### `Mounts.IPNS`
784
@@ -784,7 +786,7 @@ Mountpoint for `/ipns/`.
786
787
Default: `/ipns`
788
787
-Type: `string`
789
+Type: `string` (filesystem path)
790
791
### `Mounts.FuseAllowOther`
792
@@ -806,7 +808,7 @@ Sets the default router used by pubsub to route messages to peers. This can be o
808
809
Default: `"gossipsub"`
810
809
-Type: `string`
811
+Type: `string` (one of `"floodsub"`, `"gossipsub"`, or `""` (apply default))
812
813
[gossipsub]: https://github.com/libp2p/specs/tree/master/pubsub/gossipsub
814
@@ -1054,16 +1056,22 @@ Please use [`AutoNAT.ServiceMode`][].
1056
### `Swarm.ConnMgr`
1057
1058
The connection manager determines which and how many connections to keep and can
1057
-be configured to keep.
1059
+be configured to keep. Go-ipfs currently supports two connection managers:
1060
+
1061
+* none: never close idle connections.
1062
+* basic: the default connection manager.
1063
+
1064
+Default: basic
1065
1066
#### `Swarm.ConnMgr.Type`
1067
1068
Sets the type of connection manager to use, options are: `"none"` (no connection
1069
management) and `"basic"`.
1070
1064
-Default: `"basic"`
1071
+Default: "basic".
1072
1066
-Type: `string` (one of `"basic"`, `"none"`, or `""` (default, i.e. `"basic"`).
1073
+Type: `string` (when unset or `""`, the default connection manager is applied
1074
+and all `ConnMgr` fields are ignored).
1075
1076
#### Basic Connection Manager
1077