Documentation ¶
Index ¶
- func NewCollector(db Db, url string) *eventsCollector
- type Db
- type Event
- type MemoryCollector
- func (c *MemoryCollector) GetAtxCreationDone(layer types.EpochId) int
- func (c *MemoryCollector) GetBlockCreationDone(layer types.LayerID) int
- func (c *MemoryCollector) GetCreatedAtx(epoch types.EpochId) []string
- func (c *MemoryCollector) GetNumOfCreatedATXs(layer types.LayerID) int
- func (c *MemoryCollector) GetNumOfCreatedBlocks(layer types.LayerID) int
- func (c *MemoryCollector) GetReceivedATXsNum(layer types.LayerID) int
- func (c *MemoryCollector) GetReceivedBlocks(layer types.LayerID) int
- func (c *MemoryCollector) StoreAtx(event *events.NewAtx) error
- func (c *MemoryCollector) StoreAtxCreated(event *events.AtxCreated) error
- func (c *MemoryCollector) StoreAtxValid(event *events.ValidAtx) error
- func (c *MemoryCollector) StoreBlock(event *events.NewBlock) error
- func (c *MemoryCollector) StoreBlockCreated(event *events.DoneCreatingBlock) error
- func (c *MemoryCollector) StoreBlockValid(event *events.ValidBlock) error
- func (c *MemoryCollector) StoreReward(event *events.RewardReceived) error
- func (c *MemoryCollector) StoreTx(event *events.NewTx) error
- func (c *MemoryCollector) StoreTxValid(event *events.ValidTx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCollector ¶
NewCollector created a new instance of the collector listening on url for events and writing them to the provided Db
Types ¶
type Db ¶
type Db interface { StoreBlock(event *events.NewBlock) error StoreBlockValid(event *events.ValidBlock) error StoreTx(event *events.NewTx) error StoreTxValid(event *events.ValidTx) error StoreAtx(event *events.NewAtx) error StoreAtxValid(event *events.ValidAtx) error StoreReward(event *events.RewardReceived) error StoreBlockCreated(event *events.DoneCreatingBlock) error StoreAtxCreated(event *events.AtxCreated) error }
type MemoryCollector ¶
func NewMemoryCollector ¶
func NewMemoryCollector() *MemoryCollector
func (*MemoryCollector) GetAtxCreationDone ¶
func (c *MemoryCollector) GetAtxCreationDone(layer types.EpochId) int
func (*MemoryCollector) GetBlockCreationDone ¶
func (c *MemoryCollector) GetBlockCreationDone(layer types.LayerID) int
func (*MemoryCollector) GetCreatedAtx ¶
func (c *MemoryCollector) GetCreatedAtx(epoch types.EpochId) []string
func (*MemoryCollector) GetNumOfCreatedATXs ¶
func (c *MemoryCollector) GetNumOfCreatedATXs(layer types.LayerID) int
func (*MemoryCollector) GetNumOfCreatedBlocks ¶
func (c *MemoryCollector) GetNumOfCreatedBlocks(layer types.LayerID) int
func (*MemoryCollector) GetReceivedATXsNum ¶
func (c *MemoryCollector) GetReceivedATXsNum(layer types.LayerID) int
func (*MemoryCollector) GetReceivedBlocks ¶
func (c *MemoryCollector) GetReceivedBlocks(layer types.LayerID) int
func (*MemoryCollector) StoreAtxCreated ¶
func (c *MemoryCollector) StoreAtxCreated(event *events.AtxCreated) error
func (*MemoryCollector) StoreAtxValid ¶
func (c *MemoryCollector) StoreAtxValid(event *events.ValidAtx) error
func (*MemoryCollector) StoreBlock ¶
func (c *MemoryCollector) StoreBlock(event *events.NewBlock) error
func (*MemoryCollector) StoreBlockCreated ¶
func (c *MemoryCollector) StoreBlockCreated(event *events.DoneCreatingBlock) error
func (*MemoryCollector) StoreBlockValid ¶
func (c *MemoryCollector) StoreBlockValid(event *events.ValidBlock) error
func (*MemoryCollector) StoreReward ¶
func (c *MemoryCollector) StoreReward(event *events.RewardReceived) error
func (*MemoryCollector) StoreTxValid ¶
func (c *MemoryCollector) StoreTxValid(event *events.ValidTx) error
Click to show internal directories.
Click to hide internal directories.