config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0, MIT Imports: 15 Imported by: 38

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDefaultMaxFee = types.MustParseFIL("0.007")
View Source
var DefaultSimultaneousTransfers = uint64(20)

Functions

func ConfigComment

func ConfigComment(t interface{}) ([]byte, error)

func FromFile

func FromFile(path string, def interface{}) (interface{}, error)

FromFile loads config from a specified file overriding defaults specified in the def parameter. If file does not exist or is empty defaults are assumed.

func FromReader

func FromReader(reader io.Reader, def interface{}) (interface{}, error)

FromReader loads config from a reader instance.

func StorageFromFile added in v0.3.0

func StorageFromFile(path string, def *stores.StorageConfig) (*stores.StorageConfig, error)

func StorageFromReader added in v0.3.0

func StorageFromReader(reader io.Reader) (*stores.StorageConfig, error)

func WriteStorageFile added in v0.3.0

func WriteStorageFile(path string, config stores.StorageConfig) error

Types

type API

type API struct {
	ListenAddress       string
	RemoteListenAddress string
	Timeout             Duration
}

API contains configs for API endpoint

type Client added in v0.3.0

type Client struct {
	UseIpfs               bool
	IpfsOnlineMode        bool
	IpfsMAddr             string
	IpfsUseForRetrieval   bool
	SimultaneousTransfers uint64
}

type Common

type Common struct {
	API    API
	Libp2p Libp2p
	Pubsub Pubsub
}

Common is common config between full node and miner

type DealmakingConfig added in v0.4.0

type DealmakingConfig struct {
	ConsiderOnlineStorageDeals     bool
	ConsiderOfflineStorageDeals    bool
	ConsiderOnlineRetrievalDeals   bool
	ConsiderOfflineRetrievalDeals  bool
	ConsiderVerifiedStorageDeals   bool
	ConsiderUnverifiedStorageDeals bool
	PieceCidBlocklist              []cid.Cid
	ExpectedSealDuration           Duration

	Filter          string
	RetrievalFilter string
}

type Duration

type Duration time.Duration

Duration is a wrapper type for time.Duration for decoding and encoding from/to TOML

func (Duration) MarshalText

func (dur Duration) MarshalText() ([]byte, error)

func (*Duration) UnmarshalText

func (dur *Duration) UnmarshalText(text []byte) error

UnmarshalText implements interface for TOML decoding

type FeeConfig added in v1.1.3

type FeeConfig struct {
	DefaultMaxFee types.FIL
}

type FullNode

type FullNode struct {
	Common
	Client  Client
	Metrics Metrics
	Wallet  Wallet
	Fees    FeeConfig
}

FullNode is a full node config

func DefaultFullNode

func DefaultFullNode() *FullNode

DefaultFullNode returns the default config

type Libp2p

type Libp2p struct {
	ListenAddresses     []string
	AnnounceAddresses   []string
	NoAnnounceAddresses []string
	BootstrapPeers      []string
	ProtectedPeers      []string

	ConnMgrLow   uint
	ConnMgrHigh  uint
	ConnMgrGrace Duration
}

Libp2p contains configs for libp2p

type Metrics

type Metrics struct {
	Nickname   string
	HeadNotifs bool
}

type MinerAddressConfig added in v1.2.3

type MinerAddressConfig struct {
	PreCommitControl []string
	CommitControl    []string
}

type MinerFeeConfig added in v0.5.0

type MinerFeeConfig struct {
	MaxPreCommitGasFee     types.FIL
	MaxCommitGasFee        types.FIL
	MaxWindowPoStGasFee    types.FIL
	MaxPublishDealsFee     types.FIL
	MaxMarketBalanceAddFee types.FIL
}

type Pubsub added in v0.3.0

type Pubsub struct {
	Bootstrapper bool
	DirectPeers  []string
	RemoteTracer string
}

type SealingConfig added in v0.5.0

type SealingConfig struct {
	// 0 = no limit
	MaxWaitDealsSectors uint64

	// includes failed, 0 = no limit
	MaxSealingSectors uint64

	// includes failed, 0 = no limit
	MaxSealingSectorsForDeals uint64

	WaitDealsDelay Duration
}

type StorageMiner

type StorageMiner struct {
	Common

	Dealmaking DealmakingConfig
	Sealing    SealingConfig
	Storage    sectorstorage.SealerConfig
	Fees       MinerFeeConfig
	Addresses  MinerAddressConfig
}

StorageMiner is a miner config

func DefaultStorageMiner

func DefaultStorageMiner() *StorageMiner

type Wallet added in v0.9.1

type Wallet struct {
	RemoteBackend string
	EnableLedger  bool
	DisableLocal  bool
}

Jump to

Keyboard shortcuts

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