Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
9316acfa
Commit
9316acfa
authored
Jan 26, 2015
by
Juan Batiz-Benet
Browse files
p2p/peer/peerstore: mu position + comment
parent
50c72a67
Changes
1
Hide whitespace changes
Inline
Side-by-side
peer/peerstore.go
View file @
9316acfa
...
@@ -62,9 +62,10 @@ func (e *expiringAddr) Expired() bool {
...
@@ -62,9 +62,10 @@ func (e *expiringAddr) Expired() bool {
type
addressMap
map
[
string
]
expiringAddr
type
addressMap
map
[
string
]
expiringAddr
type
addressbook
struct
{
type
addressbook
struct
{
sync
.
RWMutex
// guards all fields
addrs
map
[
ID
]
addressMap
addrs
map
[
ID
]
addressMap
ttl
time
.
Duration
// initial ttl
ttl
time
.
Duration
// initial ttl
sync
.
RWMutex
}
}
func
newAddressbook
()
*
addressbook
{
func
newAddressbook
()
*
addressbook
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment