connector

package
v0.182.36 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(s *Service) *API

func (*API) CallRPC

func (api *API) CallRPC(inputJSON string) (string, error)

type CommandRegistry added in v0.182.35

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

func NewCommandRegistry added in v0.182.35

func NewCommandRegistry() *CommandRegistry

func (*CommandRegistry) GetCommand added in v0.182.35

func (r *CommandRegistry) GetCommand(method string) (RPCCommand, bool)

func (*CommandRegistry) Register added in v0.182.35

func (r *CommandRegistry) Register(method string, command RPCCommand)

type RPCCommand added in v0.182.35

type RPCCommand interface {
	Execute(inputJSON string) (string, error)
}

type RPCRequest added in v0.182.35

type RPCRequest struct {
	JSONRPC string        `json:"jsonrpc"`
	ID      int           `json:"id"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
}

type Service

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

func NewService

func NewService(rpcClient *rpc.Client, connectorSrvc *Service) *Service

func (*Service) APIs

func (s *Service) APIs() []gethrpc.API

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

Jump to

Keyboard shortcuts

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