config

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config defines configuration used by Nym redeemer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Redeemer *Redeemer
	Logging  *Logging
	Debug    *Debug
}

Config is the top level Nym redeemer configuration.

func LoadBinary

func LoadBinary(b []byte) (*Config, error)

LoadBinary loads, parses and validates the provided buffer b (as a config) and returns the Config.

func LoadFile

func LoadFile(f string) (*Config, error)

LoadFile loads, parses and validates the provided file and returns the Config.

type Debug

type Debug struct {

	// EthereumCallTimeout defines timeout for calling the Ethereum contract to transfer tokens back from the pipe account.
	EthereumCallTimeout int

	// TransactionStatusQueryTimeout defines timeout for waiting to obtain status of particular transaction.
	TransactionStatusQueryTimeout int

	// TransactionStatusQueryInterval defines interval for querying for status of particular transaction.
	TransactionStatusQueryInterval int
}

Debug is the Nym redeemer debug configuration.

type Logging

type Logging struct {
	// Disable disables logging entirely.
	Disable bool

	// File specifies the log file, if omitted stdout will be used.
	File string

	// Level specifies the log level.
	Level string
}

Logging is the Nym redeemer logging configuration.

type Redeemer

type Redeemer struct {
	// Identifier is the human readable identifier for the node.
	Identifier string

	// KeyFile defines path to file containing ECDSA private key of the redeemer.
	KeyFile string

	// DataDir specifies path to a .db file holding relevant server-specific persistent data.
	DataDir string

	// BlockchainNodeAddresses specifies addresses of Tendermint blockchain nodes
	// to which the issuer should send all relevant requests.
	// Note that only a single request will ever be sent, but multiple addresses are provided in case
	// the particular node was unavailable.
	BlockchainNodeAddresses []string

	// PipeAccountKeyFile defines path to file containing ECDSA private key for the pipe account contract.
	PipeAccountKeyFile string

	// EthereumNodeAddress defines address of an Ethereum node to which transactions are sent.
	EthereumNodeAddress string

	// NymContract defined address of the ERC20 token Nym contract. It is expected to be provided in hex format.
	NymContract ethcommon.Address
}

Redeemer is the main Nym redeemer configuration.

Jump to

Keyboard shortcuts

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