p2p

package
v0.0.0-...-575f8db Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNullNode

func NewNullNode(peers []*enode.Node, asymKey *ecdsa.PrivateKey) (server *p2p.Server, err error)

Types

type Config

type Config struct {
	EnodeString string
	// encryption
	AsymKey *ecdsa.PrivateKey
}

type NameServer

type NameServer interface {
	Query(common.Address, bool) string
}

type NilName

type NilName string

func (NilName) Query

func (n NilName) Query(addr common.Address, b bool) string

type P2PMessager

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

func NewP2PMessager

func NewP2PMessager(config *Config, nameServer NameServer) (*P2PMessager, error)

func (*P2PMessager) AddToptic

func (m *P2PMessager) AddToptic(topic, passwd string) error

func (*P2PMessager) Run

func (m *P2PMessager) Run(topic, passwd string)

type Topic

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

Jump to

Keyboard shortcuts

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