ragedisco

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const MaxOracles = 165

Maximum number of distinct oracles that we can have across groups. The exact number is chosen arbitrarily. Better to have an arbitrary limit than no limit.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcement

type Announcement struct {
	PublicKey ed25519.PublicKey // PublicKey used to verify Sig
	Sig       []byte            // sig over unsignedAnnouncement
	// contains filtered or unexported fields
}

Announcement is a signed message in which a peer attests to their network addresses. An Announcement needs to adhere to some syntactic validity rules, found in checkWellFormed(), which are enforced on calls to verify().

func (Announcement) PeerID

func (ann Announcement) PeerID() (ragetypes.PeerID, error)

func (Announcement) String

func (ann Announcement) String() string

type Ragep2pDiscoverer

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

func NewRagep2pDiscoverer

func NewRagep2pDiscoverer(
	deltaReconcile time.Duration,
	announceAddresses []string,
	db nettypes.DiscovererDatabase,
	metricsRegisterer prometheus.Registerer,
) *Ragep2pDiscoverer

func (*Ragep2pDiscoverer) AddGroup

func (r *Ragep2pDiscoverer) AddGroup(digest types.ConfigDigest, onodes []ragetypes.PeerID, bnodes []ragetypes.PeerInfo) error

func (*Ragep2pDiscoverer) Close

func (r *Ragep2pDiscoverer) Close() error

func (*Ragep2pDiscoverer) FindPeer

func (r *Ragep2pDiscoverer) FindPeer(peer ragetypes.PeerID) ([]ragetypes.Address, error)

func (*Ragep2pDiscoverer) RemoveGroup

func (r *Ragep2pDiscoverer) RemoveGroup(digest types.ConfigDigest) error

RemoveGroup should not block or panic even if the discoverer is closed.

func (*Ragep2pDiscoverer) Start

type WrappableMessage

type WrappableMessage interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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