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 ¶
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 ¶
UnmarshalJSON umarshall json - template of ffjson
func (*KafkaMsg) UnmarshalJSONFFLexer ¶
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
Click to show internal directories.
Click to hide internal directories.