mode

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

simple module to record the global running mode

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainName

func ChainName() string

name of the current chain

func Finalise

func Finalise()

shutdown mode handling

func Initialise

func Initialise(chainName string) error

set up the mode system

func Is

func Is(mode Mode) bool

detect mode

func IsNot

func IsNot(mode Mode) bool

detect mode

func IsTesting

func IsTesting() bool

special for testing

func Set

func Set(mode Mode)

change mode

func String

func String() string

current mode represented as a string

Types

type Mode

type Mode int

type to hold the mode

const (
	Stopped Mode = iota
	Resynchronise
	Normal
)

all possible modes

func (Mode) String added in v0.2.0

func (m Mode) String() string

current mode rep[resented as a string

Jump to

Keyboard shortcuts

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