blankhost

package module
v0.0.0-...-fec5240 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2017 License: MIT Imports: 11 Imported by: 25 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-libp2p-blankhost

Coverage Status Travis CI

A very thin implementation of go-libp2p-host. Does not contain any identify, relay, or NAT traversal code.

Table of Contents

Install

make install

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Jeromy Johnson

Documentation

Index

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 NewBlankHost

func NewBlankHost(n inet.Network) *BlankHost

func (*BlankHost) Addrs

func (bh *BlankHost) Addrs() []ma.Multiaddr

func (*BlankHost) Close

func (bh *BlankHost) Close() error

func (*BlankHost) ConnManager

func (bh *BlankHost) ConnManager() connmgr.ConnManager

func (*BlankHost) Connect

func (bh *BlankHost) Connect(ctx context.Context, pi pstore.PeerInfo) error

func (*BlankHost) ID

func (bh *BlankHost) ID() peer.ID

func (*BlankHost) Mux

func (bh *BlankHost) Mux() *mstream.MultistreamMuxer

TODO: i'm not sure this really needs to be here

func (*BlankHost) Network

func (bh *BlankHost) Network() inet.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) (inet.Stream, error)

func (*BlankHost) Peerstore

func (bh *BlankHost) Peerstore() pstore.Peerstore

func (*BlankHost) RemoveStreamHandler

func (bh *BlankHost) RemoveStreamHandler(p protocol.ID)

func (*BlankHost) SetStreamHandler

func (bh *BlankHost) SetStreamHandler(pid protocol.ID, handler inet.StreamHandler)

func (*BlankHost) SetStreamHandlerMatch

func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(string) bool, handler inet.StreamHandler)

Jump to

Keyboard shortcuts

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