Skip to content

Commit 06e6618

Browse files
committed
docs: Provider.Strategy
explicitly document it is not used - without this legacy users will have it in their config and be very confused
1 parent 9a04312 commit 06e6618

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

cmd/ipfs/kubo/daemon.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,8 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
485485
// This should never happen, but better safe than sorry
486486
log.Fatal("Private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)")
487487
}
488-
if cfg.Provider.Strategy != "" && cfg.Reprovider.Strategy.IsDefault() {
489-
// Provider.Strategy isn't used anywhere.
490-
log.Fatal("Switch to using Reprovider.Strategy instead of Provider.Strategy. Update your config to remove this message.")
488+
if cfg.Provider.Strategy.WithDefault("") != "" && cfg.Reprovider.Strategy.IsDefault() {
489+
log.Fatal("Invalid config. Remove unsued Provider.Strategy and set Reprovider.Strategy instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy")
491490
}
492491

493492
printLibp2pPorts(node)

core/commands/stat_reprovide.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ var statReprovideCmd = &cmds.Command{
2424
Helptext: cmds.HelpText{
2525
Tagline: "Returns statistics about the node's reprovider system.",
2626
ShortDescription: `
27-
Returns statistics about the content the node is reproviding every Reprovider.Interval.
27+
Returns statistics about the content the node is reproviding every
28+
Reprovider.Interval according to Reprovider.Strategy:
29+
https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider
2830
2931
This interface is not stable and may change from release to release.
3032
31-
See https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider
3233
`,
3334
},
3435
Arguments: []cmds.Argument{},

docs/config.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ config file at runtime.
106106
- [`Pinning.RemoteServices: Policies.MFS.PinName`](#pinningremoteservices-policiesmfspinname)
107107
- [`Pinning.RemoteServices: Policies.MFS.RepinInterval`](#pinningremoteservices-policiesmfsrepininterval)
108108
- [`Provider`](#provider)
109+
- [`Provider.Strategy`](#providerstrategy)
109110
- [`Provider.WorkerCount`](#providerworkercount)
110111
- [`Pubsub`](#pubsub)
111112
- [`Pubsub.Enabled`](#pubsubenabled)
@@ -209,6 +210,7 @@ config file at runtime.
209210
- [`announce-on` profile](#announce-on-profile)
210211
- [`legacy-cid-v0` profile](#legacy-cid-v0-profile)
211212
- [`test-cid-v1` profile](#test-cid-v1-profile)
213+
- [`test-cid-v1-wide` profile](#test-cid-v1-wide-profile)
212214
- [Types](#types)
213215
- [`flag`](#flag)
214216
- [`priority`](#priority)
@@ -1414,6 +1416,10 @@ commands.
14141416

14151417
For periodical DHT reprovide settings, see [`Reprovide.*`](#reprovider).
14161418

1419+
### `Provider.Strategy`
1420+
1421+
Legacy, not used at the moment, see [`Reprovider.Strategy`](#reproviderstrategy) instead.
1422+
14171423
### `Provider.WorkerCount`
14181424

14191425
Sets the maximum number of _concurrent_ DHT provide operations. DHT reprovides

0 commit comments

Comments
 (0)