etherface

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EtherfaceDBPath = "/root/node/etherface"
	DefaultAttempts = 3
)

Variables

View Source
var (
	ErrorNoResults = errors.New("no results")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Lookup(ctx context.Context, hash string) (string, error)
}

func NewEtherfaceClient

func NewEtherfaceClient() (Client, error)

NewEtherfaceClient creates a new Etherface client based on leveldb

type ClientOption

type ClientOption func(client *etherfaceClient) error

func WithAttempts

func WithAttempts(attempts uint) ClientOption

WithAttempts sets the number of attempts for querying the etherface database

type MockClient added in v0.4.19

type MockClient interface {
	Lookup(ctx context.Context, hash string) (string, error)
}

func NewMockEtherfaceClient added in v0.4.19

func NewMockEtherfaceClient() (MockClient, error)

NewMockEtherfaceClient creates a new Etherface client based on leveldb

Jump to

Keyboard shortcuts

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