libp2p

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0, MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const DealProtocolv120ID = "/fil/storage/mk/1.2.0"
View Source
const DealProtocolv121ID = "/fil/storage/mk/1.2.1"
View Source
const DealStatusV12ProtocolID = "/fil/storage/status/1.2.0"
View Source
const TransportsProtocolID = "/fil/retrieval/transports/1.0.0"

Variables

This section is empty.

Functions

func MakeAddrsFactory

func MakeAddrsFactory(announceAddrs []multiaddr.Multiaddr) (basichost.AddrsFactory, error)

func NewDealProvider

func NewDealProvider(ctx context.Context, db *harmonydb.DB, cfg *config.CurioConfig, prov *mk12.MK12, api mk12libp2pAPI, sender *message.Sender, miners []address.Address, machine string, shutdownChan chan struct{})

func Router

func Router(mux *chi.Mux, rp *Redirector)

Router sets up the route for the WebSocket connection

Types

type DealProvider

type DealProvider struct {
	PublicAddrs *PublicAddrs
	// contains filtered or unexported fields
}

DealProvider listens for incoming deal proposals over libp2p

func (*DealProvider) Start

func (p *DealProvider) Start(ctx context.Context, host host.Host)

type PublicAddrs

type PublicAddrs struct {
	Libp2pAddr multiaddr.Multiaddr
	HttpAddr   multiaddr.Multiaddr
}

func NewLibp2pHost

func NewLibp2pHost(ctx context.Context, db *harmonydb.DB, cfg *config.CurioConfig, machine string) (host.Host, *PublicAddrs, error)

type Redirector

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

Redirector struct with a database connection

func NewRedirector

func NewRedirector(db *harmonydb.DB) *Redirector

NewRedirector creates a new Redirector with a database connection

Jump to

Keyboard shortcuts

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