Documentation
¶
Overview ¶
Package service provides the ctop service backend
Index ¶
- type Connector
- func (c *Connector) Close()
- func (c *Connector) GetNewRoundSteps() <-chan types.EventDataRoundState
- func (c *Connector) GetNewRounds() <-chan types.EventDataNewRound
- func (c *Connector) GetVotes() <-chan types.EventDataVote
- func (c *Connector) Network() string
- func (c *Connector) Start() error
- func (c *Connector) Validators() ([]*types.Validator, error)
- type RedisEventStream
- func (rds *RedisEventStream) PersistNewRoundEvents(network string) error
- func (rds *RedisEventStream) PersistNewRoundStepEvents(network string) error
- func (rds *RedisEventStream) PersistVoteEvents(network string) error
- func (rds *RedisEventStream) StreamRedisEvents(network string, eventType cmtpubsub.Query, outCh chan interface{}) error
- type Service
- type ValidatorIndexer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
connects to a single chain
func NewConnector ¶
func (*Connector) GetNewRoundSteps ¶
func (c *Connector) GetNewRoundSteps() <-chan types.EventDataRoundState
Returns a channel that can be used to retrieve NewRoundStep events
func (*Connector) GetNewRounds ¶
func (c *Connector) GetNewRounds() <-chan types.EventDataNewRound
Returns a channel that can be used to retrieve NewRound events
func (*Connector) GetVotes ¶
func (c *Connector) GetVotes() <-chan types.EventDataVote
Returns a channel that can be used to retrieve vote events
type RedisEventStream ¶
type RedisEventStream struct { CredClient *cred.CredClient Database *db.Database // contains filtered or unexported fields }
func NewRedisEventStream ¶
func (*RedisEventStream) PersistNewRoundEvents ¶
func (rds *RedisEventStream) PersistNewRoundEvents( network string, ) error
func (*RedisEventStream) PersistNewRoundStepEvents ¶
func (rds *RedisEventStream) PersistNewRoundStepEvents( network string, ) error
func (*RedisEventStream) PersistVoteEvents ¶
func (rds *RedisEventStream) PersistVoteEvents( network string, ) error
func (*RedisEventStream) StreamRedisEvents ¶
func (rds *RedisEventStream) StreamRedisEvents( network string, eventType cmtpubsub.Query, outCh chan interface{}, ) error
streams events from redis, inserting into database
type Service ¶
type Service struct { CredClient *cred.CredClient sync.RWMutex // contains filtered or unexported fields }
func NewService ¶
func (*Service) StartEventSubscriptions ¶
starts all connectors and listens to incoming events
type ValidatorIndexer ¶
type ValidatorIndexer struct {
// contains filtered or unexported fields
}
Periodically indexes
func NewValidatorIndexer ¶
func (*ValidatorIndexer) Start ¶
func (vi *ValidatorIndexer) Start( pollFrequency time.Duration, )
Click to show internal directories.
Click to hide internal directories.