config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 1 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 {
	RPCURL string
}

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig returns a new config with default values. Default values can be overwritten with env variables, most importantly RPC_URL for a custom endpoint. TODO: rewrite as init function

func (*Config) ExtractDefaultRPCURL

func (c *Config) ExtractDefaultRPCURL()

ExtractDefaultRPCURL reads the env variable RPC_URL and sets it in the config. If that variable is unset or empty, it will fallback to "http://127.0.0.1:9933"

Jump to

Keyboard shortcuts

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