Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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
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 ¶
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
Click to show internal directories.
Click to hide internal directories.