mode

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package mode - 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

ChainName - name of the current chain

func Finalise

func Finalise() error

Finalise - shutdown mode handling

func Initialise

func Initialise(chainName string) error

Initialise - set up the mode system

func Is

func Is(mode Mode) bool

Is - detect mode

func IsNot

func IsNot(mode Mode) bool

IsNot - detect mode

func IsTesting

func IsTesting() bool

IsTesting - special for testing

func Set

func Set(mode Mode)

Set - change mode

func String

func String() string

String - current mode represented as a string

Types

type Mode

type Mode int

Mode - 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

String - current mode represented as a string

Jump to

Keyboard shortcuts

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