global

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2017-2018 OneLedger

The overall running context. Initialized right away, but is mutable.

Contains the main variables.

Precedence:

  • Default values
  • Environment variables (like $OLROOT)
  • Configuration files
  • Command line arguments
  • Overrides

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Application persist.Access // Global Access to the application when it is running

	Debug            bool // DEBUG flag
	DisablePasswords bool // DEBUG flag

	NodeName        string // Name of this instance
	NodeAccountName string // TODO: Should be a list of accounts
	NodeIdentity    string
	RootDir         string // Working directory for this instance

	RpcAddress string // rpc address
	Transport  string // socket vs grpc

	AppAddress string // app address

	BTCAddress string // Bitcoin node Address port
	ETHAddress string // Ethereum node Address port

	Sequence int64 // replay protection
}
var Current *Context

func NewContext

func NewContext(name string) *Context

Set the default values for any context variables here (and no where else)

func (*Context) GetApplication

func (context *Context) GetApplication() persist.Access

func (*Context) SetApplication

func (context *Context) SetApplication(app persist.Access) persist.Access

Jump to

Keyboard shortcuts

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