pendingtx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

type KafkaClient struct {
	Topic string
	*kafka.Writer
}

func NewKafkaClient

func NewKafkaClient(addrs []string, topic string) *KafkaClient

func (*KafkaClient) Send

func (kc *KafkaClient) Send(hash []byte, tx *watcher.Transaction) error

type KafkaMsg

type KafkaMsg struct {
	Topic  string               `json:"topic"`
	Source interface{}          `json:"source"`
	Data   *watcher.Transaction `json:"data"`
}

func (*KafkaMsg) MarshalJSON

func (j *KafkaMsg) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*KafkaMsg) MarshalJSONBuf

func (j *KafkaMsg) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*KafkaMsg) UnmarshalJSON

func (j *KafkaMsg) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*KafkaMsg) UnmarshalJSONFFLexer

func (j *KafkaMsg) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Sender

type Sender interface {
	Send(hash []byte, tx *watcher.Transaction) error
}

type Watcher

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

func NewWatcher

func NewWatcher(clientCtx context.CLIContext, log log.Logger, sender Sender) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()

Jump to

Keyboard shortcuts

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