processedincidents

package
v0.9.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 New

func New(st store.IStore) *Service

func (*Service) CleanupOldIncidents

func (s *Service) CleanupOldIncidents(ctx context.Context, opts ...repos.Option) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL