services

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Client

type Client string
const (
	ClientUnknown    Client = "unknown"
	ClientGeth       Client = "geth"
	ClientNethermind Client = "nethermind"
	ClientBesu       Client = "besu"
	ClientErigon     Client = "erigon"
	ClientReth       Client = "reth"
	ClientEthereumJS Client = "ethereumjs"
)

func ClientFromString

func ClientFromString(client string) Client

type MetadataService

type MetadataService struct {
	Network *networks.Network
	// contains filtered or unexported fields
}

func NewMetadataService

func NewMetadataService(log logrus.FieldLogger, rpc *ethrpc.Provider) MetadataService

func (*MetadataService) Client

func (m *MetadataService) Client(ctx context.Context) string

func (*MetadataService) ClientVersion

func (m *MetadataService) ClientVersion() string

func (*MetadataService) IsSynced

func (m *MetadataService) IsSynced() bool

func (*MetadataService) Name

func (m *MetadataService) Name() Name

func (*MetadataService) OnReady

func (m *MetadataService) OnReady(ctx context.Context, cb func(context.Context) error)

func (*MetadataService) Ready

func (m *MetadataService) Ready(ctx context.Context) error

func (*MetadataService) RefreshAll

func (m *MetadataService) RefreshAll(ctx context.Context) error

func (*MetadataService) Start

func (m *MetadataService) Start(ctx context.Context) error

func (*MetadataService) Stop

func (m *MetadataService) Stop(ctx context.Context) error

func (*MetadataService) Web3ClientVersion

func (m *MetadataService) Web3ClientVersion(ctx context.Context) (string, error)

type Name

type Name string

type Service

type Service interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Ready(ctx context.Context) error
	OnReady(ctx context.Context, cb func(ctx context.Context) error)
	Name() Name
}

Jump to

Keyboard shortcuts

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