forked from cerc-io/ipld-eth-server
update to work with go-ipfs fork that doesn't use go modules and so can play nice with our forked dependencies; update documentation and dockerfile
This commit is contained in:
+4
@@ -11,12 +11,16 @@ import (
|
||||
|
||||
const bufferSize = 16
|
||||
|
||||
// PubSub is a simple interface for publishing blocks and being able to subscribe
|
||||
// for cids. It's used internally by bitswap to decouple receiving blocks
|
||||
// and actually providing them back to the GetBlocks caller.
|
||||
type PubSub interface {
|
||||
Publish(block blocks.Block)
|
||||
Subscribe(ctx context.Context, keys ...cid.Cid) <-chan blocks.Block
|
||||
Shutdown()
|
||||
}
|
||||
|
||||
// New generates a new PubSub interface.
|
||||
func New() PubSub {
|
||||
return &impl{
|
||||
wrapped: *pubsub.New(bufferSize),
|
||||
|
||||
Reference in New Issue
Block a user