1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-24 19:27:14 +08:00

10 Commits

Author SHA1 Message Date
Kay
f12b372af9 style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
d2268793dc go-ipfs-config: feat: Swarm.RelayService (circuit v2) (#146)
* remove the EnableRelayHop option in the SwarmConfig

* add an option to disable the limited relay

* make the relay service resources configurable

* refactor: use custom types

This enables us to swap defaults in go-ipfs without touching the config
file generated during `ipfs init`

https://github.com/ipfs/go-ipfs-config/pull/146#discussion_r734728162
https://github.com/ipfs/go-ipfs-config/pull/146#discussion_r734728019

* use OptionalDuration in RelayService configuration

* fix: *OptionalInteger with omitempty

This removes null values from the config

* fix: Flag does not need to be a pointer

* refactor: flatten RelayService limits

this simplifies consumer code and removes nil footgun

* docs: clarify different relay types

* feat: flag for ForceReachability mode in libp2p (#150)

adds Internal.Libp2pForceReachability
needed for sharness tests in ipfs/go-ipfs#8522

Co-authored-by: Marcin Rataj <lidel@lidel.org>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-11-13 03:07:14 -08:00
ba9d9f609c go-ipfs-config: fix: String method on the OptionalString (#153)
* fix: String method on the OptionalString
* test(OptionalString): empty string is preserved

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-10-29 17:21:53 +02:00
cdaa222b22 go-ipfs-config: feat: OptionalString type and UnixFSShardingSizeThreshold (#149)
* feat: add OptionalString type
* test: fix OptionalInteger test
* add Internal.UnixFSShardingSizeThreshold as optional string
* test: OptionalString null unmarshal with default
* fix: omitempty UnixFSShardingSizeThreshold

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-10-28 22:55:08 +02:00
2cf170d5fa go-ipfs-config: feat: add an OptionalDuration type (#148)
* feat: make it possible to define optional durations
* test: empty/default optional durations
does not crash if user restores default value and sets it to empty string ""

* refactor: use null in JSON
* refactor(duration): use JSON null as the default

Rationale:
https://github.com/ipfs/go-ipfs-config/pull/148#discussion_r736975879

* refactor: Duration → OptionalDuration

This makes it possible to use OptionalDuration with `json:",omitempty"`
so the null is not serialized to JSON, and get working WithDefault as well.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-10-27 18:23:35 +02:00
ac81804c8c go-ipfs-config: feat: add an OptionalInteger type 2021-08-18 08:14:25 -04:00
7ce67b8954 go-ipfs-config: feat: add WithDefault for flag/priority
This makes it easier to resolve these fields.
2020-06-15 19:19:01 -07:00
dfe53cd5b6 go-ipfs-config: feat: add flag and priority types
These let us zero-encode "default" to "null" (and omit it with "omitempty") so
we don't have to hard code the default in the config.
2020-06-15 15:24:00 -07:00
25a96cfb1b go-ipfs-config: feat: add and use a duration helper type 2020-04-14 20:04:40 -07:00
3cd45d889a go-ipfs-config: add tests for the "Strings" type
(missed in my previous PR)
2018-12-13 16:03:29 -08:00