modules

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0, MIT Imports: 99 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JWTSecretName   = "auth-jwt-private" //nolint:gosec
	KTJwtHmacSecret = "jwt-hmac-secret"  //nolint:gosec
)
View Source
const (
	// EnvWatchdogDisabled is an escape hatch to disable the watchdog explicitly
	// in case an OS/kernel appears to report incorrect information. The
	// watchdog will be disabled if the value of this env variable is 1.
	EnvWatchdogDisabled = "LOTUS_DISABLE_WATCHDOG"
)

Variables

View Source
var (
	StorageCounterDSPrefix = "/storage/nextid"
)

Functions

func APISecret

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

func ClientBlockstore

func ClientBlockstore() dtypes.ClientBlockstore

TODO this should be removed.

func ConfigBootstrap

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

func ConnectSealingService

func ConnectSealingService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerSealingService, error)

func ConnectStorageService

func ConnectStorageService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerStorageService, error)

func Datastore

func Datastore(disableLog bool) func(lc fx.Lifecycle, mctx helpers.MetricsCtx, r lotus_repo.LockedRepo) (lotus_dtypes.MetadataDS, error)

func Graphsync

func Graphsync(parallelTransfersForStorage uint64, parallelTransfersForRetrieval uint64) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, r repo.LockedRepo, clientBs dtypes.ClientBlockstore, chainBs dtypes.ExposedBlockstore, h host.Host) (dtypes.Graphsync, error)

Graphsync creates a graphsync instance from the given loader and storer

func HandleMigrateClientFunds

func HandleMigrateClientFunds(lc fx.Lifecycle, ds lotus_dtypes.MetadataDS, wallet full.WalletAPI, fundMgr *market.FundManager)

func HandleProposalLogCleaner

func HandleProposalLogCleaner(duration time.Duration) func(lc fx.Lifecycle, plDB *db.ProposalLogsDB)

Boost inserts a row into the DB for each deal proposal accepted or rejected. This method periodically cleans up the rows.

func HandleRetrievalTransports added in v1.4.0

func HandleRetrievalTransports(lc fx.Lifecycle, l *lp2pimpl.TransportsListener)

func KeyStore

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

func LockedRepo

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

func MemoryConstraints

func MemoryConstraints() system.MemoryConstraints

MemoryConstraints returns the memory constraints configured for this system.

func MemoryWatchdog

func MemoryWatchdog(lr lotus_repo.LockedRepo, lc fx.Lifecycle, constraints system.MemoryConstraints)

MemoryWatchdog starts the memory watchdog, applying the computed resource constraints.

func NewBoostDB

func NewBoostDB(r lotus_repo.LockedRepo) (*sql.DB, error)

func NewClientDatastore

func NewClientDatastore(ds lotus_dtypes.MetadataDS) dtypes.ClientDatastore

NewClientDatastore creates a datastore for the client to store its deals

func NewDealsDB

func NewDealsDB(sqldb *sql.DB) *db.DealsDB

func NewFundsDB

func NewFundsDB(sqldb *sql.DB) *db.FundsDB

func NewLogsDB

func NewLogsDB(logsSqlDB *LogSqlDB) *db.LogsDB

func NewProposalLogsDB

func NewProposalLogsDB(sqldb *sql.DB) *db.ProposalLogsDB

func NewProviderDataTransfer

NewProviderDataTransfer returns a data transfer manager

func NewTracing added in v1.4.0

func NewTracing(cfg *config.Boost) func(lc fx.Lifecycle) (*tracing.Tracing, error)

func NewTransportsListener added in v1.4.0

func NewTransportsListener(cfg *config.Boost) func(h host.Host) (*lp2pimpl.TransportsListener, error)

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 ResourceManager added in v1.2.0

func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error)

The code in this file is a direct copy from lotus. Unfortunately the lotus modules ResourceManager checks repo.RepoType().Type() == "FullNode", but the Boost node reports "Boost" as its type rather then "FullNode" so we need to change this one line

func RetrievalBlockstoreAccessor

func RetrievalBlockstoreAccessor(r repo.LockedRepo) (retrievalmarket.BlockstoreAccessor, error)

RetrievalBlockstoreAccessor returns the default retrieval blockstore accessor using the subdirectory `retrievals` under the repo.

func RetrievalClient

RetrievalClient creates a new retrieval client attached to the client blockstore

func StorageBlockstoreAccessor

func StorageBlockstoreAccessor(importmgr dtypes.ClientImportMgr) storagemarket.BlockstoreAccessor

StorageBlockstoreAccessor returns the default storage blockstore accessor from the import manager.

func StorageNetworkName

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

Types

type Genesis

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

type JwtPayload

type JwtPayload struct {
	Allow []auth.Permission
}

type LogSqlDB

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

func NewLogsSqlDB

func NewLogsSqlDB(r repo.LockedRepo) (*LogSqlDB, error)

type MinerSealingService

type MinerSealingService lapi.StorageMiner

type MinerStorageService

type MinerStorageService lapi.StorageMiner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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