factory

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPublicKeyToPeerID

func ConvertPublicKeyToPeerID(pk crypto.PublicKey) (core.PeerID, error)

ConvertPublicKeyToPeerID will convert a public key to core.PeerID

func NewNetworkMessenger

func NewNetworkMessenger(args ArgsNetworkMessenger) (p2p.Messenger, error)

NewNetworkMessenger creates a libP2P messenger by opening a port on the current machine

func NewPeersHolder

func NewPeersHolder(preferredConnectionAddresses []string) (p2p.PreferredPeersHolderHandler, error)

NewPeersHolder returns a new instance of peersHolder

func NewPeersRatingHandler

func NewPeersRatingHandler(args ArgPeersRatingHandler) (p2p.PeersRatingHandler, error)

NewPeersRatingHandler returns a new peers rating handler

Types

type ArgPeersRatingHandler

type ArgPeersRatingHandler = rating.ArgPeersRatingHandler

ArgPeersRatingHandler is the DTO used to create a new peers rating handler

type ArgsNetworkMessenger

type ArgsNetworkMessenger = libp2p.ArgsNetworkMessenger

ArgsNetworkMessenger defines the options used to create a p2p wrapper

type LocalSyncTimer

type LocalSyncTimer = libp2p.LocalSyncTimer

LocalSyncTimer uses the local system to provide the current time

type Message

type Message = message.Message

Message is a data holder struct

type PeerShard

type PeerShard = message.PeerShard

PeerShard represents the data regarding a new direct connection`s info

Jump to

Keyboard shortcuts

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