aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/filter.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-14 18:24:43 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-14 18:24:43 +0800
commit59bff465053312013253f8c4288b6fb0c1e3e4e1 (patch)
tree8384e2228a634749295727750e95e48d8338a66e /whisper/filter.go
parent5205b2f19b9173580f9a9e727d74e202b8dd0f67 (diff)
downloaddexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar.gz
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar.bz2
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar.lz
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar.xz
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.tar.zst
dexon-59bff465053312013253f8c4288b6fb0c1e3e4e1.zip
whisper: general cleanups, documentation
Diffstat (limited to 'whisper/filter.go')
-rw-r--r--whisper/filter.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/whisper/filter.go b/whisper/filter.go
index 7258de3e7..8fcc45afd 100644
--- a/whisper/filter.go
+++ b/whisper/filter.go
@@ -1,10 +1,13 @@
+// Contains the message filter for fine grained subscriptions.
+
package whisper
import "crypto/ecdsa"
+// Filter is used to subscribe to specific types of whisper messages.
type Filter struct {
- To *ecdsa.PublicKey
- From *ecdsa.PublicKey
- Topics []Topic
- Fn func(*Message)
+ To *ecdsa.PublicKey // Recipient of the message
+ From *ecdsa.PublicKey // Sender of the message
+ Topics []Topic // Topics to watch messages on
+ Fn func(*Message) // Handler in case of a match
}