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:
@ -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
14
config/version.go
Normal 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"`
|
||||
}
|
Reference in New Issue
Block a user