environment

package
v0.4.5-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunningDev  RunningMode = "dev"
	RunningTest RunningMode = "test"
	RunningMain RunningMode = "prod"

	// Orphanage is the default farmid where nodes are registered
	// if no farmid were specified on the kernel command line
	OrphanageDev  pkg.FarmID = 0
	OrphanageTest pkg.FarmID = 0
	OrphanageMain pkg.FarmID = 0
)

Possible running mode of a node

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	RunningMode RunningMode

	BcdbURL      string
	BcdbPassword string

	FlistURL string
	BinRepo  string

	FarmerID pkg.FarmID
	Orphan   bool
}

Environment holds information about running environment of a node it defines the different constant based on the running mode (dev, test, prod)

func Get

func Get() (Environment, error)

Get return the running environment of the node

type RunningMode

type RunningMode string

RunningMode type

func (RunningMode) String

func (r RunningMode) String() string

Jump to

Keyboard shortcuts

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