peering

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EstuaryPeeringService

type EstuaryPeeringService struct {
	*peering.PeeringService
}

A wrapper for the `PeeringService` struct.

func NewEstuaryPeeringService

func NewEstuaryPeeringService(host host.Host) *EstuaryPeeringService

NewEstuaryPeeringService Construct a new Estuary Peering Service

func (*EstuaryPeeringService) AddPeer

func (ps *EstuaryPeeringService) AddPeer(info peer.AddrInfo)

AddPeer this function adds a peer on the current EstuaryPeeringService

func (*EstuaryPeeringService) ListPeers

func (ps *EstuaryPeeringService) ListPeers() []peer.AddrInfo

ListPeers this function lists all peers on the current EstuaryPeeringService

func (*EstuaryPeeringService) RemovePeer

func (ps *EstuaryPeeringService) RemovePeer(peerId peer.ID)

RemovePeer this function removes a peer on the current EstuaryPeeringService

func (*EstuaryPeeringService) Start

func (ps *EstuaryPeeringService) Start() error

Start this function starts the EstuaryPeeringService

func (*EstuaryPeeringService) Stop

func (ps *EstuaryPeeringService) Stop() error

Stop this function stop the EstuaryPeeringService

type PeeringPeer

type PeeringPeer struct {
	ID        string   `json:"ID"`
	Addrs     []string `json:"Addrs"`
	Connected bool     `json:"Connected,omitempty"`
}

A struct that is used to store the information of a peer.

Jump to

Keyboard shortcuts

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