modules

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: Apache-2.0, MIT Imports: 97 Imported by: 29

Documentation

Index

Constants

View Source
const JWTSecretName = "auth-jwt-private" //nolint:gosec
View Source
const KTJwtHmacSecret = "jwt-hmac-secret" //nolint:gosec

Variables

View Source
var StorageCounterDSPrefix = "/storage/nextid"

Functions

func APISecret

func APISecret(keystore types.KeyStore, lr repo.LockedRepo) (*dtypes.APIAlg, error)

func BuiltinBootstrap

func BuiltinBootstrap() (dtypes.BootstrapPeers, error)

func BuiltinDrandConfig added in v0.4.1

func BuiltinDrandConfig() dtypes.DrandConfig

func ClientBlockstoreRetrievalStoreManager added in v0.5.0

func ClientBlockstoreRetrievalStoreManager(bs dtypes.ClientBlockstore) dtypes.ClientRetrievalStoreManager

ClientBlockstoreRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore

func ClientImportMgr added in v0.5.0

func ClientMultiDatastore added in v0.5.0

func ClientMultiDatastore(lc fx.Lifecycle, r repo.LockedRepo) (dtypes.ClientMultiDstore, error)

func ClientRetrievalStoreManager added in v0.5.0

func ClientRetrievalStoreManager(imgr dtypes.ClientImportMgr) dtypes.ClientRetrievalStoreManager

ClientRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore

func ConfigBootstrap

func ConfigBootstrap(peers []string) func() (dtypes.BootstrapPeers, error)

func Datastore

func Datastore(r repo.LockedRepo) (dtypes.MetadataDS, error)

func DoSetGenesis added in v0.3.0

func DoSetGenesis(_ dtypes.AfterGenesisSet)

func DrandBootstrap added in v0.4.0

func DrandBootstrap(d dtypes.DrandConfig) (dtypes.DrandBootstrap, error)

func GetParams

func GetParams(sbc *ffiwrapper.Config) error

func Graphsync added in v0.3.0

Graphsync creates a graphsync instance from the given loader and storer

func HandleDeals

func HandleDeals(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, h storagemarket.StorageProvider)

func HandleIncomingMessages

func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, mpool *messagepool.MessagePool, h host.Host, nn dtypes.NetworkName)

func HandleRetrieval

func HandleRetrieval(host host.Host, lc fx.Lifecycle, m retrievalmarket.RetrievalProvider)

func IpfsClientBlockstore added in v0.3.0

func IpfsClientBlockstore(ipfsMaddr string) func(helpers.MetricsCtx, fx.Lifecycle, dtypes.ClientImportMgr) (dtypes.ClientBlockstore, error)

IpfsClientBlockstore returns a ClientBlockstore implementation backed by an IPFS node. If ipfsMaddr is empty, a local IPFS node is assumed considering IPFS_PATH configuration. If ipfsMaddr is not empty, it will connect to the remote IPFS node with the provided multiaddress. The flag useForRetrieval indicates if the IPFS node will also be used for storing retrieving deals.

func KeyStore

func KeyStore(lr repo.LockedRepo) (types.KeyStore, error)

func LoadGenesis

func LoadGenesis(genBytes []byte) func(dtypes.ChainBlockstore) Genesis

func LockedRepo

func LockedRepo(lr repo.LockedRepo) func(lc fx.Lifecycle) repo.LockedRepo

func MinerAddress added in v0.3.0

func MinerAddress(ds dtypes.MetadataDS) (dtypes.MinerAddress, error)

func MinerID added in v0.3.0

func MinerID(ma dtypes.MinerAddress) (dtypes.MinerID, error)

func NetworkName added in v0.3.0

func NewClientDatastore added in v0.3.0

func NewClientDatastore(ds dtypes.MetadataDS) dtypes.ClientDatastore

NewClientDatastore creates a datastore for the client to store its deals

func NewClientGraphsyncDataTransfer added in v0.3.0

func NewClientGraphsyncDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.Graphsync, ds dtypes.MetadataDS) (dtypes.ClientDataTransfer, error)

NewClientGraphsyncDataTransfer returns a data transfer manager that just uses the clients's Client DAG service for transfers

func NewConsiderOfflineRetrievalDealsConfigFunc added in v0.4.1

func NewConsiderOfflineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOfflineRetrievalDealsConfigFunc, error)

func NewConsiderOfflineStorageDealsConfigFunc added in v0.4.1

func NewConsiderOfflineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOfflineStorageDealsConfigFunc, error)

func NewConsiderOnlineRetrievalDealsConfigFunc added in v0.4.1

func NewConsiderOnlineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineRetrievalDealsConfigFunc, error)

func NewConsiderOnlineStorageDealsConfigFunc added in v0.4.1

func NewConsiderOnlineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error)

func NewGetExpectedSealDurationFunc added in v0.5.0

func NewGetExpectedSealDurationFunc(r repo.LockedRepo) (dtypes.GetExpectedSealDurationFunc, error)

func NewGetSealConfigFunc added in v0.5.0

func NewGetSealConfigFunc(r repo.LockedRepo) (dtypes.GetSealingConfigFunc, error)

func NewLocalDiscovery added in v0.2.1

func NewLocalDiscovery(ds dtypes.MetadataDS) *discovery.Local

func NewProviderDAGServiceDataTransfer

func NewProviderDAGServiceDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.StagingGraphsync, ds dtypes.MetadataDS) (dtypes.ProviderDataTransfer, error)

NewProviderDAGServiceDataTransfer returns a data transfer manager that just uses the provider's Staging DAG service for transfers

func NewProviderPieceStore added in v0.3.0

func NewProviderPieceStore(ds dtypes.MetadataDS) dtypes.ProviderPieceStore

NewProviderPieceStore creates a statestore for storing metadata about pieces shared by the storage and retrieval providers

func NewSetConsiderOfflineRetrievalDealsConfigFunc added in v0.4.1

func NewSetConsiderOfflineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.SetConsiderOfflineRetrievalDealsConfigFunc, error)

func NewSetConsiderOnlineRetrievalDealsConfigFunc added in v0.4.1

func NewSetConsiderOnlineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.SetConsiderOnlineRetrievalDealsConfigFunc, error)

func NewSetConsideringOfflineStorageDealsFunc added in v0.4.1

func NewSetConsideringOfflineStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderOfflineStorageDealsConfigFunc, error)

func NewSetConsideringOnlineStorageDealsFunc added in v0.4.1

func NewSetConsideringOnlineStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderOnlineStorageDealsConfigFunc, error)

func NewSetExpectedSealDurationFunc added in v0.5.0

func NewSetExpectedSealDurationFunc(r repo.LockedRepo) (dtypes.SetExpectedSealDurationFunc, error)

func NewSetSealConfigFunc added in v0.5.0

func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error)

func NewSetStorageDealPieceCidBlocklistConfigFunc added in v0.4.1

func NewSetStorageDealPieceCidBlocklistConfigFunc(r repo.LockedRepo) (dtypes.SetStorageDealPieceCidBlocklistConfigFunc, error)

func NewSlashFilter added in v0.5.0

func NewSlashFilter(ds dtypes.MetadataDS) *slashfilter.SlashFilter

func NewStorageAsk added in v0.3.1

func NewStorageDealPieceCidBlocklistConfigFunc added in v0.4.1

func NewStorageDealPieceCidBlocklistConfigFunc(r repo.LockedRepo) (dtypes.StorageDealPieceCidBlocklistConfigFunc, error)

func NewSyncer

func NewSyncer(lc fx.Lifecycle, sm *stmgr.StateManager, bsync *blocksync.BlockSync, h host.Host, beacon beacon.RandomBeacon, verifier ffiwrapper.Verifier) (*chain.Syncer, error)

func ProofsConfig added in v0.3.0

func ProofsConfig(maddr dtypes.MinerAddress, fnapi lapi.FullNode) (*ffiwrapper.Config, error)

func RandomBeacon added in v0.3.0

func RecordValidator

func RecordValidator(ps peerstore.Peerstore) record.Validator

RecordValidator provides namesys compatible routing record validator

func RegisterClientValidator

func RegisterClientValidator(crv dtypes.ClientRequestValidator, dtm dtypes.ClientDataTransfer)

RegisterClientValidator is an initialization hook that registers the client request validator with the data transfer module as the validator for StorageDataTransferVoucher types

func RetrievalClient added in v0.2.1

RetrievalClient creates a new retrieval client attached to the client blockstore

func RetrievalProvider added in v0.2.1

RetrievalProvider creates a new retrieval provider attached to the provider blockstore

func RunBlockSync

func RunBlockSync(h host.Host, svc *blocksync.BlockSyncService)

func RunHello

func RunHello(mctx helpers.MetricsCtx, lc fx.Lifecycle, h host.Host, svc *hello.Service) error

func RunPeerMgr

func RunPeerMgr(mctx helpers.MetricsCtx, lc fx.Lifecycle, pmgr *peermgr.PeerMgr)

func SectorIDCounter added in v0.3.0

func SectorIDCounter(ds dtypes.MetadataDS) sealing.SectorIDCounter

func SetGenesis

func SetGenesis(cs *store.ChainStore, g Genesis) (dtypes.AfterGenesisSet, error)

func SetupJournal added in v0.5.0

func SetupJournal(lr repo.LockedRepo) error

func StagingBlockstore added in v0.2.1

func StagingBlockstore(r repo.LockedRepo) (dtypes.StagingBlockstore, error)

StagingBlockstore creates a blockstore for staging blocks for a miner in a storage deal, prior to sealing

func StagingDAG

StagingDAG is a DAGService for the StagingBlockstore

func StagingGraphsync added in v0.2.1

StagingGraphsync creates a graphsync instance which reads and writes blocks to the StagingBlockstore

func StagingMultiDatastore added in v0.5.0

func StagingMultiDatastore(lc fx.Lifecycle, r repo.LockedRepo) (dtypes.StagingMultiDstore, error)

func StorageAuth added in v0.3.0

func StorageNetworkName added in v0.3.0

func StorageNetworkName(ctx helpers.MetricsCtx, a lapi.FullNode) (dtypes.NetworkName, error)

Types

type ClientDealFunds added in v0.5.0

type ClientDealFunds funds.DealFunds

func NewClientDealFunds added in v0.5.0

func NewClientDealFunds(ds dtypes.MetadataDS) (ClientDealFunds, error)

type Genesis

type Genesis func() (*types.BlockHeader, error)

func ErrorGenesis

func ErrorGenesis() Genesis

type JwtPayload added in v0.5.0

type JwtPayload struct {
	Allow []auth.Permission
}

type ProviderDealFunds added in v0.5.0

type ProviderDealFunds funds.DealFunds

func NewProviderDealFunds added in v0.5.0

func NewProviderDealFunds(ds dtypes.MetadataDS) (ProviderDealFunds, error)

type RandomBeaconParams added in v0.3.1

type RandomBeaconParams struct {
	fx.In

	PubSub      *pubsub.PubSub `optional:"true"`
	Cs          *store.ChainStore
	DrandConfig dtypes.DrandConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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