config

package
v0.0.0-...-71505b4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                                  int
	Mainnet                               NetworkConfig
	Babylonnet                            NetworkConfig
	LogLevel                              string `envconfig:"LOG_LEVEL"`
	CounterIntervalHours                  int
	FutureRightsIntervalMinutes           int
	SnapshotCheckIntervalMinutes          int
	DoubleBakingCheckIntervalMinutes      int
	DoubleEndorsementCheckIntervalMinutes int
}

Config stores the required configuration.

func Parse

func Parse() Config

Parse initializes the configuration from .env file or from environment.

type DbLogger

type DbLogger struct{}

DbLogger is a simple log wrapper for use with gorm and logrus.

func (*DbLogger) Print

func (*DbLogger) Print(args ...interface{})

Print directs the log ouput to trace level.

type NetworkConfig

type NetworkConfig struct {
	SqlConnectionString string
	NodeRpc             client.TransportConfig
}

Jump to

Keyboard shortcuts

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