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 ¶ added in v1.6.0
MarshalJSON marshal bytes to json - template
func (*KafkaMsg) MarshalJSONBuf ¶ added in v1.6.0
func (j *KafkaMsg) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*KafkaMsg) UnmarshalJSON ¶ added in v1.6.0
UnmarshalJSON umarshall json - template of ffjson
func (*KafkaMsg) UnmarshalJSONFFLexer ¶ added in v1.6.0
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
Click to show internal directories.
Click to hide internal directories.