Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit f0f0f61

Browse files
use OptionalDuration in RelayService configuration
1 parent 22e74e3 commit f0f0f61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: swarm.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type RelayService struct {
4646
Limit RelayLimit
4747

4848
// ReservationTTL is the duration of a new (or refreshed reservation).
49-
ReservationTTL Duration
49+
ReservationTTL *OptionalDuration `json:",omitempty"`
5050

5151
// MaxReservations is the maximum number of active relay slots.
5252
MaxReservations OptionalInteger
@@ -66,7 +66,7 @@ type RelayService struct {
6666
// RelayLimit are the per relayed connection resource limits.
6767
type RelayLimit struct {
6868
// Duration is the time limit before resetting a relayed connection.
69-
Duration Duration
69+
Duration *OptionalDuration `json:",omitempty"`
7070
// Data is the limit of data relayed (on each direction) before resetting the connection.
7171
Data OptionalInteger
7272
}

0 commit comments

Comments
 (0)