eventbus

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2022 License: Apache-2.0, MIT Imports: 2 Imported by: 35

README

DEPRECATION NOTICE

This package has moved into go-libp2p as a sub-package, github.com/libp2p/go-libp2p/p2p/host/eventbus.

go-eventbus

GoDoc Coverage Status Build Status Discourse posts

Simple and fast eventbus for type-based local event delivery.

Install

go get github.com/libp2p/go-eventbus

Usage

Check out the GoDocs.

License

Dual-licensed under MIT and ASLv2, by way of the Permissive License Stack.

Documentation

Overview

Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/host/eventbus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufSize deprecated added in v0.0.2

func BufSize(n int) func(interface{}) error

Deprecated: Use github.com/libp2p/go-libp2p/p2p/host/eventbus.BufSize instead.

func NewBus deprecated

func NewBus() event.Bus

Deprecated: Use github.com/libp2p/go-libp2p/p2p/host/eventbus.NewBus instead.

func Stateful

func Stateful(s interface{}) error

Stateful is an Emitter option which makes the eventbus channel 'remember' last event sent, and when a new subscriber joins the bus, the remembered event is immediately sent to the subscription channel.

This allows to provide state tracking for dynamic systems, and/or allows new subscribers to verify that there are Emitters on the channel Deprecated: Use github.com/libp2p/go-libp2p/p2p/host/eventbus.Stateful instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL