parent
4e84ab6c81
commit
4f3a97bcc3
10
pubsub.go
10
pubsub.go
|
@ -26,6 +26,13 @@ const (
|
||||||
var log = logging.Logger("pubsub")
|
var log = logging.Logger("pubsub")
|
||||||
|
|
||||||
type PubSub struct {
|
type PubSub struct {
|
||||||
|
// atomic counter for seqnos
|
||||||
|
// NOTE: Must be declared at the top of the struct as we perform atomic
|
||||||
|
// operations on this field.
|
||||||
|
//
|
||||||
|
// See: https://golang.org/pkg/sync/atomic/#pkg-note-BUG
|
||||||
|
counter uint64
|
||||||
|
|
||||||
host host.Host
|
host host.Host
|
||||||
|
|
||||||
rt PubSubRouter
|
rt PubSubRouter
|
||||||
|
@ -79,9 +86,6 @@ type PubSub struct {
|
||||||
seenMessages *timecache.TimeCache
|
seenMessages *timecache.TimeCache
|
||||||
|
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
|
|
||||||
// atomic counter for seqnos
|
|
||||||
counter uint64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PubSubRouter is the message router component of PubSub
|
// PubSubRouter is the message router component of PubSub
|
||||||
|
|
Loading…
Reference in New Issue