nbre

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExecutionTimeoutSeconds max nbre execution timeout.
	ExecutionTimeoutSeconds = 15
)

Variables

View Source
var (
	ErrConfigNotFound        = errors.New("nbre config not found")
	ErrNbreStartFailed       = errors.New("nbre start failed")
	ErrCommandNotFound       = errors.New("nbre command not found")
	ErrExecutionTimeout      = errors.New("nbre execute timeout")
	ErrHandlerNotFound       = errors.New("nbre handler not found")
	ErrNebCallbackTimeout    = errors.New("nbre neb callback timeout")
	ErrNbreCallbackFailed    = errors.New("nbre callback failed")
	ErrNbreCallbackTimeout   = errors.New("nbre callback timeout")
	ErrNbreCallbackException = errors.New("nbre callback exception")
	ErrNbreCallbackNotReady  = errors.New("nbre callback not ready")
	ErrNbreCallbackCodeErr   = errors.New("nbre callback code not found")
)

Error types

View Source
var (
	CommandVersion        = "version"
	CommandIRList         = "irList"
	CommandIRVersions     = "irVersions"
	CommandNRHandler      = "nrHandler"
	CommandNRListByHandle = "nrListByHandle"
	CommandNRListByHeight = "nrListByHeight"
	CommandNRSum          = "nrSum"
	CommandDIPList        = "dipList"
)

Command types

Functions

func InitializeNbre

func InitializeNbre()

InitializeNbre initialize nbre

func NbreDipRewardFunc

func NbreDipRewardFunc(code C.int, holder unsafe.Pointer, dip_reward *C.char)

NbreDipRewardFunc returns nbre dip list

func NbreIrListFunc

func NbreIrListFunc(code C.int, holder unsafe.Pointer, ir_name_list *C.char)

NbreIrListFunc returns nbre ir list

func NbreIrVersionsFunc

func NbreIrVersionsFunc(code C.int, holder unsafe.Pointer, ir_versions *C.char)

NbreIrVersionsFunc returns nbre ir versions

func NbreNrHandleFunc

func NbreNrHandleFunc(code C.int, holder unsafe.Pointer, nr_handle *C.char)

NbreNrHandleFunc returns nbre nr handle

func NbreNrResultByHeightFunc

func NbreNrResultByHeightFunc(code C.int, holder unsafe.Pointer, nr_result *C.char)

NbreNrResultByHeightFunc returns nbre nr list

func NbreNrResultByhandleFunc

func NbreNrResultByhandleFunc(code C.int, holder unsafe.Pointer, nr_result *C.char)

NbreNrResultByhandleFunc returns nbre nr list

func NbreNrSumFunc

func NbreNrSumFunc(code C.int, holder unsafe.Pointer, nr_sum *C.char)

NbreNrSumFunc returns nbre nr summary data

func NbreVersionFunc

func NbreVersionFunc(code C.int, holder unsafe.Pointer, major C.uint32_t, minor C.uint32_t, patch C.uint32_t)

NbreVersionFunc returns nbre version

func NewNbre

func NewNbre(neb Neblet) core.Nbre

NewNbre create new Nbre

Types

type Nbre

type Nbre struct {
	// contains filtered or unexported fields
}

Nbre type of Nbre

func (*Nbre) Execute

func (n *Nbre) Execute(command string, args ...interface{}) (interface{}, error)

Execute execute command

func (*Nbre) Start

func (n *Nbre) Start() error

Start launch the nbre

func (*Nbre) Stop

func (n *Nbre) Stop()

Stop stop nbre

type Neblet

type Neblet interface {
	Config() *nebletpb.Config
	BlockChain() *core.BlockChain
}

type Version

type Version struct {
	Major uint64 `json:"major"`
	Minor uint64 `json:"minor"`
	Patch uint64 `json:"patch"`
}

func (*Version) FromBytes

func (v *Version) FromBytes(data []byte) error

func (*Version) ToBytes

func (v *Version) ToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

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