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

Commit 6266d71

Browse files
committed
feat: add Addresses#AppendAnnounce
1 parent 57c16bd commit 6266d71

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

addresses.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package config
22

33
// Addresses stores the (string) multiaddr addresses for the node.
44
type Addresses struct {
5-
Swarm []string // addresses for the swarm to listen on
6-
Announce []string // swarm addresses to announce to the network
7-
NoAnnounce []string // swarm addresses not to announce to the network
8-
API Strings // address for the local API (RPC)
9-
Gateway Strings // address to listen on for IPFS HTTP object gateway
5+
Swarm []string // addresses for the swarm to listen on
6+
Announce []string // swarm addresses to announce to the network, if len > 0 replaces auto detected addresses
7+
AppendAnnounce []string // similar to Announce but doesn't overwride auto detected addresses, they are just appended
8+
NoAnnounce []string // swarm addresses not to announce to the network
9+
API Strings // address for the local API (RPC)
10+
Gateway Strings // address to listen on for IPFS HTTP object gateway
1011
}

init.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ func addressesConfig() Addresses {
121121
"/ip4/0.0.0.0/udp/4001/quic",
122122
"/ip6/::/udp/4001/quic",
123123
},
124-
Announce: []string{},
125-
NoAnnounce: []string{},
126-
API: Strings{"/ip4/127.0.0.1/tcp/5001"},
127-
Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
124+
Announce: []string{},
125+
AppendAnnounce: []string{},
126+
NoAnnounce: []string{},
127+
API: Strings{"/ip4/127.0.0.1/tcp/5001"},
128+
Gateway: Strings{"/ip4/127.0.0.1/tcp/8080"},
128129
}
129130
}
130131

0 commit comments

Comments
 (0)