external

package
v1.3.15-indexer1.2.18 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilDelegatedListHandler = errors.New("nil delegated list handler")

ErrNilDelegatedListHandler signals that a nil delegated list handler has been provided

View Source
var ErrNilDirectStakeListHandler = errors.New("nil direct stake list handler")

ErrNilDirectStakeListHandler signals that a nil stake list handler has been provided

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

ErrNilSCQueryService signals that a nil SC query service has been provided

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

ErrNilStatusMetrics signals that a nil status metrics was provided

View Source
var ErrNilTotalStakedValueHandler = errors.New("nil total staked value handler")

ErrNilTotalStakedValueHandler signals that a nil total staked value handler has been provided

View Source
var ErrNilTransactionCostHandler = errors.New("nil transaction cost handler")

ErrNilTransactionCostHandler signals that a nil transaction cost handler was provided

View Source
var ErrNilVmContainer = errors.New("nil vm container")

ErrNilVmContainer signals that a nil vm container has been provided

View Source
var ErrNilVmFactory = errors.New("nil vm factory")

ErrNilVmFactory signals that a nil vm factory has been provided

Functions

func NewNodeApiResolver

func NewNodeApiResolver(arg ArgNodeApiResolver) (*nodeApiResolver, error)

NewNodeApiResolver creates a new nodeApiResolver instance

Types

type ArgNodeApiResolver added in v1.1.45

type ArgNodeApiResolver struct {
	SCQueryService          SCQueryService
	StatusMetricsHandler    StatusMetricsHandler
	TxCostHandler           TransactionCostHandler
	TotalStakedValueHandler TotalStakedValueHandler
	DirectStakedListHandler DirectStakedListHandler
	DelegatedListHandler    DelegatedListHandler
}

ArgNodeApiResolver represents the DTO structure used in the NewNodeApiResolver constructor

type DelegatedListHandler added in v1.1.45

type DelegatedListHandler interface {
	GetDelegatorsList() ([]*api.Delegator, error)
	IsInterfaceNil() bool
}

DelegatedListHandler defines the behavior of a component able to return the complete delegated list

type DirectStakedListHandler added in v1.1.45

type DirectStakedListHandler interface {
	GetDirectStakedList() ([]*api.DirectStakedValue, error)
	IsInterfaceNil() bool
}

DirectStakedListHandler defines the behavior of a component able to return the direct stake list

type SCQueryService

type SCQueryService interface {
	ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)
	ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
	Close() error
	IsInterfaceNil() bool
}

SCQueryService defines how data should be get from a SC account

type StatusMetricsHandler

type StatusMetricsHandler interface {
	StatusMetricsMapWithoutP2P() map[string]interface{}
	StatusP2pMetricsMap() map[string]interface{}
	StatusMetricsWithoutP2PPrometheusString() string
	EconomicsMetrics() map[string]interface{}
	ConfigMetrics() map[string]interface{}
	EnableEpochsMetrics() map[string]interface{}
	NetworkMetrics() map[string]interface{}
	IsInterfaceNil() bool
}

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

type TotalStakedValueHandler added in v1.1.18

type TotalStakedValueHandler interface {
	GetTotalStakedValue() (*api.StakeValues, error)
	IsInterfaceNil() bool
}

TotalStakedValueHandler defines the behavior of a component able to return total staked value

type TransactionCostHandler

type TransactionCostHandler interface {
	ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
	IsInterfaceNil() bool
}

TransactionCostHandler defines the actions which should be handler by a transaction cost estimator

Jump to

Keyboard shortcuts

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