package blankhost
import "github.com/libp2p/go-libp2p/p2p/host/blank"
Index ¶
- type BlankHost
- func NewBlankHost(n network.Network, options ...Option) *BlankHost
- func (bh *BlankHost) Addrs() []ma.Multiaddr
- func (bh *BlankHost) Close() error
- func (bh *BlankHost) ConnManager() connmgr.ConnManager
- func (bh *BlankHost) Connect(ctx context.Context, ai peer.AddrInfo) error
- func (bh *BlankHost) EventBus() event.Bus
- func (bh *BlankHost) ID() peer.ID
- func (bh *BlankHost) Mux() protocol.Switch
- func (bh *BlankHost) Network() network.Network
- func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ...protocol.ID) (network.Stream, error)
- func (bh *BlankHost) Peerstore() peerstore.Peerstore
- func (bh *BlankHost) RemoveStreamHandler(pid protocol.ID)
- func (bh *BlankHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
- func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(protocol.ID) bool, handler network.StreamHandler)
- type Option
Types ¶
type BlankHost ¶
type BlankHost struct {
// contains filtered or unexported fields
}
BlankHost is the thinnest implementation of the host.Host interface
func NewBlankHost ¶
func (*BlankHost) Addrs ¶
func (*BlankHost) Close ¶
func (*BlankHost) ConnManager ¶
func (bh *BlankHost) ConnManager() connmgr.ConnManager
func (*BlankHost) Connect ¶
func (*BlankHost) EventBus ¶
func (*BlankHost) ID ¶
func (*BlankHost) Mux ¶
TODO: i'm not sure this really needs to be here
func (*BlankHost) Network ¶
TODO: also not sure this fits... Might be better ways around this (leaky abstractions)
func (*BlankHost) NewStream ¶
func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ...protocol.ID) (network.Stream, error)
func (*BlankHost) Peerstore ¶
func (*BlankHost) RemoveStreamHandler ¶
func (*BlankHost) SetStreamHandler ¶
func (bh *BlankHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
func (*BlankHost) SetStreamHandlerMatch ¶
func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(protocol.ID) bool, handler network.StreamHandler)
type Option ¶
type Option = func(cfg *config)
func WithConnectionManager ¶
func WithConnectionManager(cmgr connmgr.ConnManager) Option
func WithEventBus ¶
Source Files ¶
- Version
- v0.41.1 (latest)
- Published
- Mar 24, 2025
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- 3 weeks ago –
Tools for package owners.