Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor interface {
Process([]engine.Message) ([]engine.Message, []error) // Process method to process a message
}
Processor is an interface that must be implemented by the consumer of the queue
type PushService ¶
type PushService struct{}
func NewPushService ¶
func NewPushService() *PushService
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct represents a queue service with a queue channel, quit channel, maximum retries, context and a webhook messager.
func NewService ¶
func NewService(name string, maxRetries, bufferSize int, ctx context.Context) (*Service, chan error)
NewService function initializes a new Service with provided maximum retries, context and webhook messager.
func (*Service) Close ¶
func (s *Service) Close()
Close method sends a signal to the quit channel to stop the service.
func (*Service) Start ¶
Start method starts the service and processes messages from the queue channel. If processing a message fails, it requeues the message until the maximum retries is reached. If the queue was empty, it waits for a duration before continuing to avoid a busy loop. It also notifies errors using the webhook messager. The service can be stopped by sending a signal to the quit channel.
type UserOpService ¶
type UserOpService struct {
// contains filtered or unexported fields
}
func NewUserOpService ¶
func NewUserOpService(db *db.DB, evm engine.EVMRequester, pushq *Service, pools *ws.ConnectionPools) *UserOpService