1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

feat: periodic version check and json config (#10438)

Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
Patryk
2024-07-24 23:42:19 +02:00
committed by GitHub
parent ddfd776a99
commit 225dbe6c03
10 changed files with 315 additions and 10 deletions

View File

@ -37,6 +37,7 @@ type Config struct {
Plugins Plugins
Pinning Pinning
Import Import
Version Version
Internal Internal // experimental/unstable options
}

14
config/version.go Normal file
View File

@ -0,0 +1,14 @@
package config
const DefaultSwarmCheckPercentThreshold = 5
// Version allows controling things like custom user agent and update checks.
type Version struct {
// Optional suffix to the AgentVersion presented by `ipfs id` and exposed
// via libp2p identify protocol.
AgentSuffix *OptionalString `json:",omitempty"`
// Detect when to warn about new version when observed via libp2p identify
SwarmCheckEnabled Flag `json:",omitempty"`
SwarmCheckPercentThreshold *OptionalInteger `json:",omitempty"`
}