ads

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package ads provides a bundle for peer information advertisement types and initial generation of them, and deriving a peer node data structure from the ad set received over the gossip network.

Index

Constants

View Source
const DefaultAdExpiry = time.Hour * 24 * 7 // one week
View Source
const ErrNilNodeAds = "cannot process nil NodeAds"

Variables

This section is empty.

Functions

func GetMultiaddr

func GetMultiaddr(n *node.Node) (ma multiaddr.Multiaddr, e error)

func NodeFromAds

func NodeFromAds(a *NodeAds) (n *node.Node, e error)

Types

type NodeAds

type NodeAds struct {
	Peer     *adpeer.Ad
	Address  *adaddress.Ad
	Services *adservices.Ad
	Load     *adload.Ad
}

func GenerateAds

func GenerateAds(n *node.Node, load byte) (na *NodeAds, e error)

Jump to

Keyboard shortcuts

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