Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move go-eventbus here #1681

Merged
merged 65 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e922942
Initial commit
magik6k Jun 13, 2019
4e8b8db
Initial implementation
magik6k Jun 13, 2019
3f45d5b
MVP
magik6k Jun 13, 2019
c56ac37
More tests, benchmarks
magik6k Jun 13, 2019
fae8970
Placeholder for options in the interface
magik6k Jun 13, 2019
b7ad393
Address @bigs review
magik6k Jun 13, 2019
eba14f5
POC SendTo
magik6k Jun 14, 2019
0564126
Subscribe with user provided typed channels
magik6k Jun 16, 2019
e78382b
Set correct B.N on BenchmarkMs1e0m6
magik6k Jun 16, 2019
fa6505e
Merge branch 'feat/sendto' into feat/implement
magik6k Jun 16, 2019
25d4533
ForceSubType
magik6k Jun 16, 2019
af4305f
Gofmt
magik6k Jun 16, 2019
1e198f4
Use slice instead of map
Kubuxu Jun 16, 2019
db55029
Stateful emits
magik6k Jun 16, 2019
c653488
Fix data races
magik6k Jun 19, 2019
e8cf02c
Simplify withNode a bit
magik6k Jun 19, 2019
c476ef6
Some more docs
magik6k Jun 19, 2019
21e4385
Use reflect.Type in node map
magik6k Jun 19, 2019
3ed7fb3
Document options
magik6k Jun 19, 2019
beb9409
Address @stebalien's review
magik6k Jun 19, 2019
33ccec5
Move close to EmitFunc
magik6k Jun 19, 2019
e7eaa60
Update Emitter docs
magik6k Jun 19, 2019
8a6f8f9
return struct from NewBus
magik6k Jun 19, 2019
e4cf01b
BasicBus to basicBus
magik6k Jun 19, 2019
1831efd
generify options.
raulk Jun 19, 2019
45c47c8
Merge pull request #3 from libp2p/feat/interface
magik6k Jun 19, 2019
ee0cf46
Drop the interface
magik6k Jun 19, 2019
b9fe916
make Emitter an interface.
raulk Jun 19, 2019
a214a1b
remove superfluous types.
raulk Jun 19, 2019
c10f6bd
fix compile error in tests.
raulk Jun 19, 2019
56a0d61
Merge pull request #1 from libp2p/feat/implement
magik6k Jun 19, 2019
c6ab7ba
rename eventbus package. (#4)
raulk Jun 19, 2019
7f5c37c
Refinements before first release 🎉 (#7)
raulk Jun 20, 2019
a3f161b
refactor interfaces (#9)
magik6k Jun 21, 2019
de37ea9
fix close deadlock and Sub type error
magik6k Jun 22, 2019
16976a3
Add test for #10
magik6k Jun 22, 2019
6ef6b01
Improve benchmarks
Kubuxu Jun 22, 2019
a5a2fbb
Make the test fail in reasonable time
Kubuxu Jun 22, 2019
12258ae
Reduce number of samples
Kubuxu Jun 22, 2019
6759096
Clean up format
Kubuxu Jun 22, 2019
6500e55
Add benchmarks for subscribe and emitter
Kubuxu Jun 22, 2019
3643ae4
Merge pull request #12 from libp2p/feat/better-bench
magik6k Jun 22, 2019
7750ab7
Enable buffering by default
Kubuxu Jun 25, 2019
0fef0d6
Merge pull request #13 from libp2p/feat/buffer-by-default
magik6k Jun 25, 2019
1c05f12
nit: avoid ValueOf
Stebalien Jun 27, 2019
07e9677
Merge pull request #14 from libp2p/nit/simple-reflect
magik6k Jun 27, 2019
a42ace6
Merge pull request #11 from libp2p/fix/things
Stebalien Jun 27, 2019
edaaa65
nit: fix with-node
Stebalien Jun 27, 2019
ee68e8c
fix: completely drain on close
Stebalien Jun 27, 2019
0988e77
Merge pull request #18 from libp2p/fix/fully-drain
magik6k Jun 27, 2019
02effd2
fix: serialize publishing
Stebalien Jun 27, 2019
0a6e078
Merge pull request #19 from libp2p/fix/16
magik6k Jun 27, 2019
7d8a955
Merge pull request #17 from libp2p/fix/with-node
magik6k Jun 27, 2019
798a706
Return error rather than panic in Emit
bigs Jul 30, 2019
435eaa2
Return error when closing already closed emitter
bigs Jul 31, 2019
89ba38c
Update test error message
Aug 1, 2019
b649492
Merge pull request #21 from libp2p/bug/panic-after-close
Aug 6, 2019
72974d3
Support wildcard subscriptions + getter for known types (optimized) (…
raulk May 20, 2020
1370b6a
Correct a typo
Jun10ng Jun 19, 2020
a474eb3
delete extra space
Jun10ng Jun 19, 2020
264c2e7
Merge pull request #41 from Jun10ng/master
Stebalien Jun 19, 2020
0b38b75
cleanup: fix vet and staticcheck failures (#42)
iand Jul 17, 2021
e5728a2
fix panic in TestSubFailFully (#48)
marten-seemann Aug 17, 2022
261ce3b
move go-eventbus to p2p/host/eventbus
marten-seemann Aug 17, 2022
40727b1
switch from github.com/libp2p/go-eventbus to p2p/host/eventbus
marten-seemann Aug 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ require (
github.com/jbenet/go-temp-err-catcher v0.1.0
github.com/klauspost/compress v1.15.1
github.com/libp2p/go-buffer-pool v0.1.0
github.com/libp2p/go-eventbus v0.2.1
github.com/libp2p/go-libp2p-asn-util v0.2.0
github.com/libp2p/go-libp2p-core v0.19.1
github.com/libp2p/go-libp2p-testing v0.11.0
Expand Down
65 changes: 0 additions & 65 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion p2p/host/autonat/autonat.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
"sync/atomic"
"time"

"github.com/libp2p/go-eventbus"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"

"github.com/libp2p/go-libp2p-core/event"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
Expand Down
2 changes: 1 addition & 1 deletion p2p/host/basic/basic_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

"github.com/libp2p/go-libp2p/p2p/host/autonat"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
"github.com/libp2p/go-libp2p/p2p/host/pstoremanager"
"github.com/libp2p/go-libp2p/p2p/host/relaysvc"
inat "github.com/libp2p/go-libp2p/p2p/net/nat"
Expand All @@ -28,7 +29,6 @@ import (
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p-core/record"

"github.com/libp2p/go-eventbus"
"github.com/libp2p/go-netroute"

logging "github.com/ipfs/go-log/v2"
Expand Down
2 changes: 1 addition & 1 deletion p2p/host/basic/basic_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/libp2p/go-libp2p/p2p/host/autonat"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
swarmt "github.com/libp2p/go-libp2p/p2p/net/swarm/testing"
"github.com/libp2p/go-libp2p/p2p/protocol/identify"

Expand All @@ -23,7 +24,6 @@ import (
"github.com/libp2p/go-libp2p-core/record"
"github.com/libp2p/go-libp2p-core/test"

"github.com/libp2p/go-eventbus"
ma "github.com/multiformats/go-multiaddr"
madns "github.com/multiformats/go-multiaddr-dns"

Expand Down
4 changes: 2 additions & 2 deletions p2p/host/blank/blank.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"fmt"
"io"

"github.com/libp2p/go-libp2p/p2p/host/eventbus"

"github.com/libp2p/go-libp2p-core/connmgr"
"github.com/libp2p/go-libp2p-core/event"
"github.com/libp2p/go-libp2p-core/host"
Expand All @@ -15,8 +17,6 @@ import (
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p-core/record"

"github.com/libp2p/go-eventbus"

logging "github.com/ipfs/go-log/v2"

ma "github.com/multiformats/go-multiaddr"
Expand Down
5 changes: 5 additions & 0 deletions p2p/host/eventbus/LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
19 changes: 19 additions & 0 deletions p2p/host/eventbus/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading