Documentation ¶
Index ¶
- type 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(string) bool, handler network.StreamHandler)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlankHost ¶
type BlankHost struct {
// contains filtered or unexported fields
}
BlankHost is the thinnest implementation of the host.Host interface
func (*BlankHost) ConnManager ¶
func (bh *BlankHost) ConnManager() connmgr.ConnManager
func (*BlankHost) Network ¶
TODO: also not sure this fits... Might be better ways around this (leaky abstractions)
func (*BlankHost) RemoveStreamHandler ¶
func (*BlankHost) SetStreamHandler ¶
func (bh *BlankHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
func (*BlankHost) SetStreamHandlerMatch ¶
type Option ¶
type Option = func(cfg *config)
func WithConnectionManager ¶
func WithConnectionManager(cmgr connmgr.ConnManager) Option
func WithEventBus ¶
Click to show internal directories.
Click to hide internal directories.