node

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InitJournal at position 0 initializes the journal global var as soon as
	// the system starts, so that it's available for all other components.
	InitJournalKey = invoke(iota)

	// daemon
	ExtractApiKey

	SetApiEndpointKey
)

Invokes are called in the order they are defined.

Variables

This section is empty.

Functions

func From

func From(typ interface{}) interface{}

From(*T) -> func(t T) T {return t}

Types

type FullOption

type FullOption = Option

type Option

type Option func(*Settings) error

Option is a functional option which can be used with the New function to change how the node is constructed

Options are applied in sequence

func ApplyIf

func ApplyIf(check func(s *Settings) bool, opts ...Option) Option

func ConfigMinerOptions added in v1.6.1

func ConfigMinerOptions(c interface{}) Option

func Error

func Error(err error) Option

Error is a special option which returns an error when applied

func If

func If(b bool, opts ...Option) Option

func MinerAPI

func MinerAPI(out *api.MinerAPI) Option

func Options

func Options(opts ...Option) Option

Options groups multiple options into one

func Override

func Override(typ, constructor interface{}) Option

Override option changes constructor for a given type

func Repo

func Repo(cctx *cli.Context, r repo.Repo) Option

func Unset

func Unset(typ interface{}) Option

type Settings

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

type StopFunc

type StopFunc func(context.Context) error

func New

func New(ctx context.Context, opts ...Option) (StopFunc, error)

New builds and starts new Filecoin node

Directories

Path Synopsis
miner-manager/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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