pdpnode

package
v1.28.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0, MIT Imports: 54 Imported by: 0

Documentation

Overview

Package pdpnode runs PDP workflows without the curio sealing/PoRep dependency graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTasks

func AppendTasks(ctx context.Context, d *Deps, chainSched *chainsched.CurioChainSched, active *[]harmonytask.TaskInterface) (*servicedeps.Deps, error)

AppendTasks adds PDP tasks to a curio task list.

func Attach

func Attach(
	ctx context.Context,
	cd *curiodeps.Deps,
	activeTasks *[]harmonytask.TaskInterface,
	sdeps *servicedeps.Deps,
	chainSched *chainsched.CurioChainSched,
) error

Attach registers PDP tasks on a curio node.

func MountPDPRoutes

func MountPDPRoutes(ctx context.Context, r chi.Router, d *Deps, sd *servicedeps.Deps, ipp *ipni_provider.Provider) error

MountPDPRoutes attaches PDP HTTP routes using an existing IPNI provider.

func MountPublicRoutes

func MountPublicRoutes(ctx context.Context, r *chi.Mux, d *Deps, sd *servicedeps.Deps) error

MountPublicRoutes attaches shared public HTTP routes (retrieval + denylist + IPNI) and PDP.

func Run

func Run(cctx *cli.Context) error

Run starts the PDP node until shutdown.

func StartAdmin

func StartAdmin(ctx context.Context, d *Deps) (*http.Server, error)

StartAdmin serves the private operator GUI (webrpc + config).

func StartPublic

func StartPublic(ctx context.Context, d *Deps, sd *TaskResult) error

StartPublic serves the customer-facing PDP API.

Types

type Deps

type Deps struct {
	Cfg   *config.CurioConfig
	DB    *harmonydb.DB
	Chain api.Chain

	Bstore            curiochain.CurioBlockstore
	Stor              *paths.Remote
	LocalStore        *paths.Local
	LocalPaths        paths.LocalStorage
	Si                paths.SectorIndex
	PieceIO           piecestore.PieceIO
	IndexStore        *indexstore.IndexStore
	SectorReader      *pieceprovider.SectorReader
	CachedPieceReader *cachedreader.CachedPieceReader
	ServeChunker      *chunker.ServeChunker
	EthClient         *lazy.Lazy[ethchain.EthClient]
	Sender            *message.Sender
	EthSender         *message.SenderETH
	Al                *curioalerting.AlertingSystem
	Alert             *alertmanager.AlertNow
	MachineHost       string
	Name              string
	MachineID         int64
	// contains filtered or unexported fields
}

Deps holds PDP-node runtime dependencies.

func FromCurio

func FromCurio(cd *curiodeps.Deps) *Deps

FromCurio maps curio runtime deps into pdpnode deps.

Fields shared by name and identical type are copied automatically via syncMatchingDeps. The three named exceptions are handled below.

func Open

func Open(ctx context.Context, cctx *cli.Context) (*Deps, error)

Open initializes PDP-node dependencies from CLI flags and a single base config layer.

func (*Deps) Close

func (d *Deps) Close()

func (*Deps) CurioDeps

func (d *Deps) CurioDeps() *curiodeps.Deps

CurioDeps builds a curio deps struct for shared web/cuhttp integrations.

Fields shared by name and identical type are copied automatically via syncMatchingDeps. The same three exceptions are handled below.

type TaskResult

type TaskResult struct {
	Engine      *harmonytask.TaskEngine
	AlertTask   *alertmanager.AlertTask
	ServiceDeps servicedeps.Deps
	EthSender   *message.SenderETH
}

TaskResult is the output of RegisterTasks.

func RegisterTasks

func RegisterTasks(ctx context.Context, d *Deps) (*TaskResult, error)

RegisterTasks wires PDP harmony tasks and returns the task engine.

Jump to

Keyboard shortcuts

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