blankhost

package
v0.0.0-...-8b9b725 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT, MIT Imports: 11 Imported by: 0

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() ifconnmgr.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