Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-core
Commits
a1c90aa3
Unverified
Commit
a1c90aa3
authored
May 15, 2020
by
Raúl Kripalani
Committed by
GitHub
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decaying tags: support removal and closure. (#151)
parent
e74305c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
connmgr/decay.go
connmgr/decay.go
+17
-0
No files found.
connmgr/decay.go
View file @
a1c90aa3
...
...
@@ -70,6 +70,23 @@ type DecayingTag interface {
// will be applied asynchronously, and a non-nil error indicates a fault
// when queuing.
Bump
(
peer
peer
.
ID
,
delta
int
)
error
// Remove removes a decaying tag from a peer. The removal will be applied
// asynchronously, and a non-nil error indicates a fault when queuing.
Remove
(
peer
peer
.
ID
)
error
// Close closes a decaying tag. The Decayer will stop tracking this tag,
// and the state of all peers in the Connection Manager holding this tag
// will be updated.
//
// The deletion is performed asynchronously.
//
// Once deleted, a tag should not be used, and further calls to Bump/Remove
// will error.
//
// Duplicate calls to Remove will not return errors, but a failure to queue
// the first actual removal, will (e.g. when the system is backlogged).
Close
()
error
}
// DecayingValue represents a value for a decaying tag.
...
...
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