services

package
v0.0.0-...-1f13f73 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiBackend

type ApiBackend interface {
	Etherbase(ctx context.Context) (common.Address, error)
	NetVersion(ctx context.Context) (uint64, error)
	ProtocolVersion(ctx context.Context) (uint64, error)
	ClientVersion(ctx context.Context) (string, error)
	Subscribe(ctx context.Context, cb func(*remote.SubscribeReply)) error
}

ApiBackend - interface which must be used by API layer implementation can work with local Ethereum object or with Remote (grpc-based) one this is reason why all methods are accepting context and returning error

type MiningService

type MiningService struct {
	txpool.MiningClient
	// contains filtered or unexported fields
}

func NewMiningService

func NewMiningService(cc grpc.ClientConnInterface) *MiningService

func (*MiningService) EnsureVersionCompatibility

func (s *MiningService) EnsureVersionCompatibility() bool

type RemoteBackend

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

func NewRemoteBackend

func NewRemoteBackend(cc grpc.ClientConnInterface) *RemoteBackend

func (*RemoteBackend) ClientVersion

func (back *RemoteBackend) ClientVersion(ctx context.Context) (string, error)

func (*RemoteBackend) EnsureVersionCompatibility

func (back *RemoteBackend) EnsureVersionCompatibility() bool

func (*RemoteBackend) Etherbase

func (back *RemoteBackend) Etherbase(ctx context.Context) (common.Address, error)

func (*RemoteBackend) NetVersion

func (back *RemoteBackend) NetVersion(ctx context.Context) (uint64, error)

func (*RemoteBackend) ProtocolVersion

func (back *RemoteBackend) ProtocolVersion(ctx context.Context) (uint64, error)

func (*RemoteBackend) Subscribe

func (back *RemoteBackend) Subscribe(ctx context.Context, onNewEvent func(*remote.SubscribeReply)) error

type TxPoolService

type TxPoolService struct {
	txpool.TxpoolClient
	// contains filtered or unexported fields
}

func NewTxPoolService

func NewTxPoolService(cc grpc.ClientConnInterface) *TxPoolService

func (*TxPoolService) EnsureVersionCompatibility

func (s *TxPoolService) EnsureVersionCompatibility() bool

Jump to

Keyboard shortcuts

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