core

package
v0.0.0-...-d1ce744 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type ConfigOpt

type ConfigOpt func(c *Config)

func WithDatastore

func WithDatastore(ds datastore.Batching) ConfigOpt

func WithKeyPair

func WithKeyPair(pk crypto.PubKey, sk crypto.PrivKey) ConfigOpt

func WithLibp2pOptions

func WithLibp2pOptions(opts []libp2p.Option) ConfigOpt

type Peer

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

func New

func New(ctx context.Context, DHTpp protocol.ID, opts ...ConfigOpt) (*Peer, error)

func (*Peer) Bootstrap

func (p *Peer) Bootstrap(ctx context.Context, bootstrap []peer.AddrInfo) error

func (*Peer) DHT

func (p *Peer) DHT() *dual.DHT

func (*Peer) Host

func (p *Peer) Host() host.Host

Jump to

Keyboard shortcuts

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