feat: defer login bootstrap updates
This commit is contained in:
parent
a246fd5417
commit
4d9f1e271d
18 changed files with 958 additions and 188 deletions
16
internal/store/bootstrap_update_job.go
Normal file
16
internal/store/bootstrap_update_job.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"telesrv/internal/domain"
|
||||
)
|
||||
|
||||
type BootstrapUpdateJobStore interface {
|
||||
EnqueueLoginMessage(ctx context.Context, job domain.BootstrapUpdateJob) (domain.BootstrapUpdateJob, error)
|
||||
MarkReadyForSession(ctx context.Context, userID int64, authKeyID [8]byte, sessionID int64) (int, error)
|
||||
ClaimReady(ctx context.Context, limit int, leaseTimeout time.Duration) ([]domain.BootstrapUpdateJob, error)
|
||||
MarkPublished(ctx context.Context, id int64) error
|
||||
MarkFailed(ctx context.Context, id int64, lastError string) error
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue