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
30bf48c8
Unverified
Commit
30bf48c8
authored
May 20, 2020
by
Raúl Kripalani
Committed by
GitHub
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
events: add a generic DHT event. (#154)
parent
acf0d3d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
event/dht.go
event/dht.go
+21
-0
No files found.
event/dht.go
0 → 100644
View file @
30bf48c8
package
event
// RawJSON is a type that contains a raw JSON string.
type
RawJSON
string
// GenericDHTEvent is a type that encapsulates an actual DHT event by carrying
// its raw JSON.
//
// Context: the DHT event system is rather bespoke and a bit messy at the time,
// so until we unify/clean that up, this event bridges the gap. It should only
// be consumed for informational purposes.
//
// EXPERIMENTAL: this will likely be removed if/when the DHT event types are
// hoisted to core, and the DHT event system is reconciled with the eventbus.
type
GenericDHTEvent
struct
{
// Type is the type of the DHT event that occured.
Type
string
// Raw is the raw JSON representation of the event payload.
Raw
RawJSON
}
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