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) SendPending ¶
func (kc *KafkaClient) SendPending(hash []byte, tx *watcher.Transaction) error
func (*KafkaClient) SendRmPending ¶
func (kc *KafkaClient) SendRmPending(hash []byte, tx *RmPendingTx) error
type PendingMsg ¶
type PendingMsg struct { Topic string `json:"topic"` Source interface{} `json:"source"` // not use interface for fast json Data *watcher.Transaction `json:"data"` }
func (*PendingMsg) MarshalJSON ¶
func (j *PendingMsg) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*PendingMsg) MarshalJSONBuf ¶
func (j *PendingMsg) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*PendingMsg) UnmarshalJSON ¶
func (j *PendingMsg) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*PendingMsg) UnmarshalJSONFFLexer ¶
func (j *PendingMsg) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type RmPendingMsg ¶
type RmPendingMsg struct { Topic string `json:"topic"` Source interface{} `json:"source"` // not use interface for fast json Data *RmPendingTx `json:"data"` }
func (*RmPendingMsg) MarshalJSON ¶
func (j *RmPendingMsg) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*RmPendingMsg) MarshalJSONBuf ¶
func (j *RmPendingMsg) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*RmPendingMsg) UnmarshalJSON ¶
func (j *RmPendingMsg) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*RmPendingMsg) UnmarshalJSONFFLexer ¶
func (j *RmPendingMsg) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type RmPendingTx ¶
type RmPendingTx struct { From string `json:"from"` Hash string `json:"hash"` Nonce string `json:"nonce"` Delete bool `json:"delete"` Reason types.RmPendingTxReason `json:"reason"` }
func (*RmPendingTx) MarshalJSON ¶
func (j *RmPendingTx) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*RmPendingTx) MarshalJSONBuf ¶
func (j *RmPendingTx) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*RmPendingTx) UnmarshalJSON ¶
func (j *RmPendingTx) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*RmPendingTx) UnmarshalJSONFFLexer ¶
func (j *RmPendingTx) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type Sender ¶
type Sender interface { SendPending(hash []byte, tx *watcher.Transaction) error SendRmPending(hash []byte, tx *RmPendingTx) error }
Click to show internal directories.
Click to hide internal directories.