deps

package
v1.24.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0, MIT Imports: 47 Imported by: 1

Documentation

Overview

Package deps provides the dependencies for the curio node.

Index

Constants

View Source
const (
	FlagRepoPath = "repo-path"
)

Variables

View Source
var RPCErrors = jsonrpc.NewErrors()

Functions

func CreateMinerConfig

func CreateMinerConfig(ctx context.Context, full CreateMinerConfigChainAPI, db *harmonydb.DB, miners []string, info string) error

func ErrorIsIn added in v1.24.0

func ErrorIsIn(err error, errorTypes []error) bool

func FullNodeProxy added in v1.22.1

func FullNodeProxy[T api.Chain](ins []T, outstr *api.ChainStruct)

FullNodeProxy creates a proxy for the Chain API

func GetAPI added in v1.23.0

func GetAPI(ctx context.Context, cctx *cli.Context) (*harmonydb.DB, *config.CurioConfig, api.Chain, jsonrpc.ClientCloser, error)

func GetConfig

func GetConfig(ctx context.Context, layers []string, db *harmonydb.DB) (*config.CurioConfig, error)

func GetDefaultConfig

func GetDefaultConfig(comment bool) (string, error)

func GetFullNodeAPIV1Curio added in v1.23.0

func GetFullNodeAPIV1Curio(ctx *cli.Context, ainfoCfg []string) (api.Chain, jsonrpc.ClientCloser, error)

func LoadConfigWithUpgrades

func LoadConfigWithUpgrades(text string, curioConfigWithDefaults *config.CurioConfig) (toml.MetaData, error)

func MakeDB

func MakeDB(cctx *cli.Context) (*harmonydb.DB, error)

func OnSingleNode added in v1.22.1

func OnSingleNode(ctx context.Context) context.Context

OnSingleNode returns a new context that will try to perform all calls on the same node. If the backing node fails, the calls will be retried on a different node, and further calls will be made on that node. Not thread safe

func Retry added in v1.24.0

func Retry[T any](ctx context.Context, attempts int, initialBackoff time.Duration, errorTypes []error, f func(isRetry bool) (T, error)) (result T, err error)

func StorageAuth

func StorageAuth(apiKey string) (sealer.StorageAuth, error)

Types

type CreateMinerConfigChainAPI added in v1.23.0

type CreateMinerConfigChainAPI interface {
	StateMinerInfo(context.Context, address.Address, types.TipSetKey) (lapi.MinerInfo, error)
}

type Deps

type Deps struct {
	Layers     []string
	Cfg        *config.CurioConfig // values
	DB         *harmonydb.DB       // has itest capability
	Chain      api.Chain
	Bstore     curiochain.CurioBlockstore
	Verif      storiface.Verifier
	As         *multictladdr.MultiAddressSelector
	Maddrs     map[dtypes.MinerAddress]bool
	ProofTypes map[abi.RegisteredSealProof]bool
	Stor       *paths.Remote
	Al         *curioalerting.AlertingSystem
	Si         paths.SectorIndex
	LocalStore *paths.Local
	LocalPaths *paths.BasicLocalStorage
	ListenAddr string
	Name       string
	Alert      *alertmanager.AlertNow
}

func GetDeps

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

func GetDepsCLI

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

func (*Deps) PopulateRemainingDeps

func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error

type JwtPayload

type JwtPayload struct {
	Allow []auth.Permission
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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