build

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT, Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PstoreAddSelfKeysKey = invoke(iota)
	ExtractApiKey
	SetNet
)

nolint:golint

Variables

This section is empty.

Functions

func From

func From(typ interface{}) interface{}

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

func LifecycleCtx

func LifecycleCtx(mctx MetricsCtx, lc fx.Lifecycle) context.Context

LifecycleCtx creates a context which will be cancelled when lifecycle stops

This is a hack which we need because most of our services use contexts in a wrong way

Types

type MetricsCtx

type MetricsCtx context.Context

MetricsCtx is a context wrapper with metrics

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 CommonOpt

func CommonOpt(alg *jwt.HMACSHA) Option

func Error

func Error(err error) Option

Error is a special option which returns an error when applied

func FullAPIOpt

func FullAPIOpt(out *api.IFullAPI) Option

func If

func If(b bool, opts ...Option) 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 WalletOpt

func WalletOpt(repo filemgr.Repo, walletPwd string) 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 Wallet

Jump to

Keyboard shortcuts

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