Documentation ¶
Index ¶
- type Idempotency
- type Locker
- type Repository
- type Service
- func (s Service) GetTaskByID(taskID string) (taskentity.Task, error)
- func (s Service) GetTaskByIDWithContext(ctx context.Context, taskID string) (taskentity.Task, error)
- func (s Service) GetTaskStatusByID(ctx context.Context, taskID string) (taskentity.IntegrationDeliveryStatus, error)
- func (s Service) HandleTask(ctx context.Context, newEvent event.ProcessedEvent) error
- func (s Service) LockTaskByID(ctx context.Context, taskID string) (unlock func() error, err error)
- func (s Service) UpsertTaskAndSaveIdempotency(ctx context.Context, t taskentity.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Idempotency ¶
type Idempotency interface { GetTaskStatusByID(ctx context.Context, taskID string) (taskentity.IntegrationDeliveryStatus, error) SaveTaskStatus(ctx context.Context, taskID string, status taskentity.IntegrationDeliveryStatus) error }
type Repository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(idempotency Idempotency, repo Repository, l Locker, taskLockTTLSeconds int64) Service
func (Service) GetTaskByID ¶
func (s Service) GetTaskByID(taskID string) (taskentity.Task, error)
func (Service) GetTaskByIDWithContext ¶
func (Service) GetTaskStatusByID ¶
func (s Service) GetTaskStatusByID(ctx context.Context, taskID string) (taskentity.IntegrationDeliveryStatus, error)
func (Service) HandleTask ¶
func (Service) LockTaskByID ¶
func (Service) UpsertTaskAndSaveIdempotency ¶
Click to show internal directories.
Click to hide internal directories.