libp2p

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "libp2p"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable        bool   `env:"LIBP2P_ENABLE" default:"false" yaml:"enable"`
	ListenAddress string `env:"LIBP2P_LISTEN_ADDRESS" default:"0.0.0.0" yaml:"listenAddress"`
	Port          string `env:"LIBP2P_PORT" default:"9999" yaml:"port"`
	Seed          int64  `env:"LIBP2P_SEED" default:"0" yaml:"seed"`
	Peer          string `env:"LIBP2P_PEER" default:"" yaml:"peer"`
	Rendezvous    string `env:"LIBP2P_RENDEZVOUS" default:"libp2prendezvous" yaml:"rendezvous"`
}

type PeerInfo

type PeerInfo struct {
	Address string `yaml:"address" json:"address"`
}

type Plugin

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

func New

func New() *Plugin

func (*Plugin) Boot

func (p *Plugin) Boot(conf interface{}, dependencies ...interface{}) plugins.Plugin

func (*Plugin) Close

func (p *Plugin) Close() error

func (*Plugin) IsEnabled

func (p *Plugin) IsEnabled() bool

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Node

func (p *Plugin) Node() host.Host

func (*Plugin) Start

func (p *Plugin) Start() error

Jump to

Keyboard shortcuts

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