Documentation ¶
Index ¶
- Constants
- type Chain
- type KafkaSender
- func (sender *KafkaSender) Producers() []*Producer
- func (sender *KafkaSender) RunProducers() []*Producer
- func (sender *KafkaSender) SetHasSend(producerId uint8, hasSend uint64)
- func (sender *KafkaSender) Start(brokerList []string, topic string) error
- func (sender *KafkaSender) Stop(brokerList []string, topic string)
- func (sender *KafkaSender) StopAll()
- func (sender *KafkaSender) StopById(producerId uint8)
- type MqAccountBlock
- type MqSnapshotBlock
- type MqSnapshotContent
- type MqSnapshotContentItem
- type Producer
- func (producer *Producer) BrokerList() []string
- func (producer *Producer) Deserialize(buffer []byte) error
- func (producer *Producer) HasSend() uint64
- func (producer *Producer) IsSame(brokerList []string, topic string) bool
- func (producer *Producer) ProducerId() uint8
- func (producer *Producer) Serialize() ([]byte, error)
- func (producer *Producer) SetHasSend(hasSend uint64)
- func (producer *Producer) Start() error
- func (producer *Producer) Status() int
- func (producer *Producer) Stop()
- func (producer *Producer) Topic() string
Constants ¶
View Source
const ( DBKP_PRODUCER = byte(1) DBKP_PRODUCER_HAS_SEND = byte(2) )
View Source
const ( STOPPED = iota RUNNING )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaSender ¶
type KafkaSender struct {
// contains filtered or unexported fields
}
func NewKafkaSender ¶
func NewKafkaSender(chain Chain, dirName string) (*KafkaSender, error)
func (*KafkaSender) Producers ¶
func (sender *KafkaSender) Producers() []*Producer
func (*KafkaSender) RunProducers ¶
func (sender *KafkaSender) RunProducers() []*Producer
func (*KafkaSender) SetHasSend ¶
func (sender *KafkaSender) SetHasSend(producerId uint8, hasSend uint64)
func (*KafkaSender) Start ¶
func (sender *KafkaSender) Start(brokerList []string, topic string) error
func (*KafkaSender) Stop ¶
func (sender *KafkaSender) Stop(brokerList []string, topic string)
func (*KafkaSender) StopAll ¶
func (sender *KafkaSender) StopAll()
func (*KafkaSender) StopById ¶
func (sender *KafkaSender) StopById(producerId uint8)
type MqAccountBlock ¶
type MqSnapshotBlock ¶
type MqSnapshotBlock struct { *ledger.SnapshotBlock MqSnapshotContent MqSnapshotContent `json:"snapshotContent"` Producer types.Address `json:"producer"` Timestamp int64 `json:"timestamp"` }
type MqSnapshotContent ¶
type MqSnapshotContent map[types.Address]*MqSnapshotContentItem
type MqSnapshotContentItem ¶
type MqSnapshotContentItem struct { Start *ledger.HashHeight `json:"start"` End *ledger.HashHeight `json:"end"` }
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func NewProducer ¶
func NewProducerFromDb ¶
func (*Producer) BrokerList ¶
func (*Producer) Deserialize ¶
func (*Producer) ProducerId ¶
func (*Producer) SetHasSend ¶
Click to show internal directories.
Click to hide internal directories.