Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QueryBufferSize = 1024 ReadQueryResultTimeout = 50 * time.Millisecond )
View Source
var MaxTimeBetweenGroupedWrites = 5 * time.Millisecond
Functions ¶
Types ¶
type FilterKeyRegEx ¶
type FilterKeyRegEx struct {
// contains filtered or unexported fields
}
func NewFilterKeyRegEx ¶
func NewFilterKeyRegEx(regexs ...string) (*FilterKeyRegEx, error)
type PubSubBroadcaster ¶
type PubSubBroadcaster struct {
// contains filtered or unexported fields
}
PubSubBroadcaster implements a Broadcaster using libp2p PubSub.
func NewPubSubBroadcaster ¶
func NewPubSubBroadcaster(ctx context.Context, psub *pubsub.PubSub, topic string) (b *PubSubBroadcaster, err error)
NewPubSubBroadcaster returns a new broadcaster using the given PubSub and a topic to subscribe/broadcast to. The given context can be used to cancel the broadcaster. Please register any topic validators before creating the Broadcaster.
The broadcaster can be shut down by cancelling the given context. This must be done before Closing the crdt.Datastore, otherwise things may hang.
func (*PubSubBroadcaster) Broadcast ¶
func (pbc *PubSubBroadcaster) Broadcast(data []byte) error
Broadcast publishes some data.
func (*PubSubBroadcaster) Next ¶
func (pbc *PubSubBroadcaster) Next() ([]byte, error)
Next returns published data.
Click to show internal directories.
Click to hide internal directories.