Documentation
¶
Index ¶
- type Service
- func (s *Service) CleanupOldIncidents(ctx context.Context, opts ...repos.Option) error
- func (s *Service) GetIncompleteIncidents(ctx context.Context, blockchain wconstants.BlockchainType, ...) ([]*models.ProcessedIncident, error)
- func (s *Service) IsProcessed(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, ...) (bool, error)
- func (s *Service) MarkAsCompleted(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, ...) error
- func (s *Service) MarkAsFailed(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, ...) error
- func (s *Service) MarkAsProcessing(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CleanupOldIncidents ¶
CleanupOldIncidents removes old completed incidents (older than 30 days)
func (*Service) GetIncompleteIncidents ¶
func (s *Service) GetIncompleteIncidents(ctx context.Context, blockchain wconstants.BlockchainType, opts ...repos.Option) ([]*models.ProcessedIncident, error)
GetIncompleteIncidents returns all incidents that are still being processed
func (*Service) IsProcessed ¶
func (s *Service) IsProcessed(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, opts ...repos.Option) (bool, error)
IsProcessed checks if an incident has been processed
func (*Service) MarkAsCompleted ¶
func (s *Service) MarkAsCompleted(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, opts ...repos.Option) error
MarkAsCompleted marks an incident as successfully completed
func (*Service) MarkAsFailed ¶
func (s *Service) MarkAsFailed(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, errorMessage string, opts ...repos.Option) error
MarkAsFailed marks an incident as failed with an error message
func (*Service) MarkAsProcessing ¶
func (s *Service) MarkAsProcessing(ctx context.Context, blockchain wconstants.BlockchainType, incidentID string, incidentType string, rollbackFromBlock, rollbackToBlock int64, opts ...repos.Option) error
MarkAsProcessing marks an incident as being processed
Click to show internal directories.
Click to hide internal directories.