Help us shape the future of Go! Take the 2026 Go Developer Survey

adapters

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package adapters contains the private glue that composes the per-service packages (warmstorage, spregistry, payments, internal/contracts/ pdpverifier) into the narrow interfaces consumed by the storage package.

This package is a root-synapse implementation detail. It must not be imported outside the SDK and must not import the root synapse package. Each exported constructor returns a storage-package interface so that the concrete adapter types stay unexported and never enlarge the public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApprovalLockupPeriodReader added in v0.4.0

func NewApprovalLockupPeriodReader(ws priceListReader) payments.ApprovalLockupPeriodReader

NewApprovalLockupPeriodReader returns the payments approval lockup reader backed by WarmStorage pricing.

func NewDataSetFinder

func NewDataSetFinder(ws *warmstorage.Service) storage.DataSetFinder

NewDataSetFinder returns a storage.DataSetFinder backed by ws.

func NewFWSSTerminator added in v0.6.0

func NewFWSSTerminator(w *warmstorage.Service) storage.FWSSTerminator

NewFWSSTerminator returns a storage.FWSSTerminator backed by w.

func NewPaymentsFunder

func NewPaymentsFunder(p *payments.Service) storage.PaymentsFunder

NewPaymentsFunder returns a storage.PaymentsFunder backed by p.

func NewStorageInfoReader

func NewStorageInfoReader(ws *warmstorage.Service, sp *spregistry.Service, pay *payments.Service, usdfcToken, fwss common.Address) storage.StorageInfoReader

NewStorageInfoReader returns a storage.StorageInfoReader that assembles pricing, providers and allowances from ws, sp and pay.

Types

type PDPReader

PDPReader is the union of storage.PDPVerifierReader and storage.DataSetLeafCountReader satisfied by a single adapter around the abigen PDPVerifierCaller plus an RPC backend. Root synapse holds a single field of this type and fans it out to both storage options.

func NewPDPVerifierReader

func NewPDPVerifierReader(
	caller *pdpverifier.PDPVerifierCaller,
	backend pdpReaderBackend,
	address common.Address,
	maxMulticallCalls int,
) PDPReader

NewPDPVerifierReader returns a PDPReader wrapping caller and backend. When caller is nil it returns a nil interface value, letting callers keep the plain `if r != nil` check without hitting Go's typed-nil interface trap.

Jump to

Keyboard shortcuts

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