Documentation
¶
Overview ¶
Package pdpnode runs PDP workflows without the curio sealing/PoRep dependency graph.
Index ¶
- func AppendTasks(ctx context.Context, d *Deps, chainSched *chainsched.CurioChainSched, ...) (*servicedeps.Deps, error)
- func Attach(ctx context.Context, cd *curiodeps.Deps, ...) error
- func MountPDPRoutes(ctx context.Context, r chi.Router, d *Deps, sd *servicedeps.Deps, ...) error
- func MountPublicRoutes(ctx context.Context, r *chi.Mux, d *Deps, sd *servicedeps.Deps) error
- func Run(cctx *cli.Context) error
- func StartAdmin(ctx context.Context, d *Deps) (*http.Server, error)
- func StartPublic(ctx context.Context, d *Deps, sd *TaskResult) error
- type Deps
- type TaskResult
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 ¶
MountPublicRoutes attaches shared public HTTP routes (retrieval + denylist + IPNI) and PDP.
func StartAdmin ¶
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 ¶
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.
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.