owpengram-server/internal/store/bootstrap_update_job.go

18 lines
717 B
Go

package store
import (
"context"
"time"
"telesrv/internal/domain"
)
type BootstrapUpdateJobStore interface {
EnqueueLoginMessage(ctx context.Context, job domain.BootstrapUpdateJob) (domain.BootstrapUpdateJob, error)
// MarkReadyForSession allows a new session on the same auth key to take over
// a pending signup baseline fence; a different auth key can never release it.
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
}