Documentation ¶
Index ¶
- type Repository
- type Service
- func (s *Service) AggregateRewards(aggregateInterval string, beforeBlockId uint64)
- func (s *Service) GetSaveRewardsJobChannel() chan []*models.Reward
- func (s *Service) GetSaveSlashesJobChannel() chan []*models.Slash
- func (s *Service) HandleEventResponse(blockHeight uint64, response *responses.EventsResponse) error
- func (s *Service) SaveRewardsWorker(jobs <-chan []*models.Reward)
- func (s *Service) SaveSlashesWorker(jobs <-chan []*models.Slash)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (*Repository) AggregateRewards ¶
func (r *Repository) AggregateRewards(aggregateInterval string, beforeBlockId uint64) error
func (*Repository) SaveRewards ¶
func (r *Repository) SaveRewards(rewards []*models.Reward) error
func (*Repository) SaveSlashes ¶
func (r *Repository) SaveSlashes(slashes []*models.Slash) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(env *models.ExtenderEnvironment, repository *Repository, validatorRepository *validator.Repository, addressRepository *address.Repository, coinRepository *coin.Repository, coinService *coin.Service, balanceRepository *balance.Repository, logger *logrus.Entry) *Service
func (*Service) AggregateRewards ¶
func (*Service) GetSaveRewardsJobChannel ¶
func (*Service) GetSaveSlashesJobChannel ¶
func (*Service) HandleEventResponse ¶
func (s *Service) HandleEventResponse(blockHeight uint64, response *responses.EventsResponse) error
Handle response and save block to DB
func (*Service) SaveRewardsWorker ¶
func (*Service) SaveSlashesWorker ¶
Click to show internal directories.
Click to hide internal directories.