notifier

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidValue = errors.New("invalid value")

ErrInvalidValue signals that an invalid value has been provided

View Source
var ErrNilHTTPClientWrapper = errors.New("nil http client wrapper")

ErrNilHTTPClientWrapper signals that a nil http client wrapper has been provided

View Source
var ErrNilHasher = errors.New("hasher is nil")

ErrNilHasher is raised when a valid hasher is expected but nil used

View Source
var ErrNilMarshaller = errors.New("nil marshaller")

ErrNilMarshaller signals that a nil marshaller has been provided

View Source
var ErrNilPubKeyConverter = errors.New("nil pub key converter")

ErrNilPubKeyConverter signals that a nil pubkey converter has been provided

View Source
var ErrNilTransactionsPool = errors.New("nil transactions pool")

ErrNilTransactionsPool signals that a nil transactions pool was provided

Functions

func NewEventNotifier

func NewEventNotifier(args ArgsEventNotifier) (*eventNotifier, error)

NewEventNotifier creates a new instance of the eventNotifier It implements all methods of process.Indexer

func NewHTTPWrapperClient added in v1.4.0

func NewHTTPWrapperClient(args HTTPClientWrapperArgs) (*httpClientWrapper, error)

NewHTTPWrapperClient creates an instance of httpClient which is a wrapper for http.Client

Types

type ArgsEventNotifier

type ArgsEventNotifier struct {
	HttpClient      httpClientHandler
	Marshaller      marshal.Marshalizer
	Hasher          hashing.Hasher
	PubKeyConverter core.PubkeyConverter
}

ArgsEventNotifier defines the arguments needed for event notifier creation

type Event

type Event struct {
	Address    string   `json:"address"`
	Identifier string   `json:"identifier"`
	TxHash     string   `json:"txHash"`
	Topics     [][]byte `json:"topics"`
	Data       []byte   `json:"data"`
}

Event holds event data

type FinalizedBlock

type FinalizedBlock struct {
	Hash string `json:"hash"`
}

FinalizedBlock holds finalized block data

type HTTPClientWrapperArgs added in v1.4.0

type HTTPClientWrapperArgs struct {
	UseAuthorization  bool
	Username          string
	Password          string
	BaseUrl           string
	RequestTimeoutSec int
}

HTTPClientWrapperArgs defines the arguments needed for http client creation

type RevertBlock

type RevertBlock struct {
	Hash  string `json:"hash"`
	Nonce uint64 `json:"nonce"`
	Round uint64 `json:"round"`
	Epoch uint32 `json:"epoch"`
}

RevertBlock holds revert event data

type SaveBlockData

type SaveBlockData struct {
	Hash      string                                                  `json:"hash"`
	Txs       map[string]nodeData.TransactionHandlerWithGasUsedAndFee `json:"txs"`
	Scrs      map[string]nodeData.TransactionHandlerWithGasUsedAndFee `json:"scrs"`
	LogEvents []Event                                                 `json:"events"`
}

SaveBlockData holds the data that will be sent to notifier instance

Jump to

Keyboard shortcuts

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