config

package
v0.0.0-...-0d2a5dc Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(configFile string)

Types

type API

type API struct {
	Node   *APIInfo
	Market *APIInfo
	Miner  *APIInfo
}
var (
	AddrKey = "Addr"
	Api     API // TODO(arijit): Remove it from global vars.
)

func GetAPIInfo

func GetAPIInfo() (API, error)

func (*API) Store

func (a *API) Store(configFile string)

type APIInfo

type APIInfo struct {
	Addr  multiaddr.Multiaddr
	Token []byte
}

func (APIInfo) AuthHeader

func (a APIInfo) AuthHeader() http.Header

func (APIInfo) DialArgs

func (a APIInfo) DialArgs() (string, error)

func (*APIInfo) UnmarshalJSON

func (a *APIInfo) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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