libp2putil

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: ? modules, 0 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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLibp2pIdentity

func GetLibp2pIdentity(lPeer *peer.Local) (libp2p.Option, error)

GetLibp2pIdentity returns libp2p Host option for Identity from local peer object.

func ToLibp2pPeerID

func ToLibp2pPeerID(p *peer.Peer) (libp2ppeer.ID, error)

ToLibp2pPeerID computes libp2p peer ID from our peer object.

func ToLibp2pPrivateKey

func ToLibp2pPrivateKey(ourPrivateKey ed25519.PrivateKey) (libp2pcrypto.PrivKey, error)

ToLibp2pPrivateKey transforms private key in our type to libp2p type.

Types

type UvarintReader

type UvarintReader struct {
	// contains filtered or unexported fields
}

UvarintReader read protobuf blocks.

func NewDelimitedReader

func NewDelimitedReader(r io.Reader) *UvarintReader

NewDelimitedReader returns a new UvarintReader.

func (*UvarintReader) ReadBlk

func (ur *UvarintReader) ReadBlk(blk proto.Message) error

ReadBlk read protobuf blocks.

type UvarintWriter

type UvarintWriter struct {
	// contains filtered or unexported fields
}

UvarintWriter writes protobuf blocks.

func NewDelimitedWriter

func NewDelimitedWriter(w io.Writer) *UvarintWriter

NewDelimitedWriter returns a new UvarintWriter.

func (*UvarintWriter) WriteBlk

func (uw *UvarintWriter) WriteBlk(blk proto.Message) (err error)

WriteBlk writes protobuf block.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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