external

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBlockChain = errors.New("nil block chain")

ErrNilBlockChain signals that an operation has been attempted to or with a nil blockchain

View Source
var ErrNilMarshalizer = errors.New("nil Marshalizer")

ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation

View Source
var ErrNilSCQueryService = errors.New("nil SC query service")

ErrNilSCQueryService signals that a nil SC query service has been provided

View Source
var ErrNilShardCoordinator = errors.New("nil shard coordinator")

ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator

View Source
var ErrNilStatusMetrics = errors.New("nil status metrics handler")

ErrNilStatusMetrics signals that a nil status metrics was provided

View Source
var ErrNilStore = errors.New("nil data storage service")

ErrNilStore signals that the provided storage service is nil

View Source
var ErrWrongTypeAssertion = errors.New("wrong type assertion")

ErrWrongTypeAssertion signals that a wrong type assertion occurred

Functions

This section is empty.

Types

type NodeApiResolver

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

NodeApiResolver can resolve API requests

func NewNodeApiResolver

func NewNodeApiResolver(scQueryService SCQueryService, statusMetricsHandler StatusMetricsHandler) (*NodeApiResolver, error)

NewNodeApiResolver creates a new NodeApiResolver instance

func (*NodeApiResolver) ExecuteSCQuery

func (nar *NodeApiResolver) ExecuteSCQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)

ExecuteSCQuery retrieves data stored in a SC account through a VM

func (*NodeApiResolver) IsInterfaceNil

func (nar *NodeApiResolver) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*NodeApiResolver) StatusMetrics

func (nar *NodeApiResolver) StatusMetrics() StatusMetricsHandler

StatusMetrics returns an implementation of the StatusMetricsHandler interface

type SCQueryService

type SCQueryService interface {
	ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)
	IsInterfaceNil() bool
}

SCQueryService defines how data should be get from a SC account

type StatusMetricsHandler

type StatusMetricsHandler interface {
	StatusMetricsMap() (map[string]interface{}, error)
	IsInterfaceNil() bool
}

StatusMetricsHandler is the interface that defines what a node details handler/provider should do

Jump to

Keyboard shortcuts

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