bouncer/internal/queue/adapter.go

17 lines
335 B
Go
Raw Permalink Normal View History

2023-04-24 20:52:12 +02:00
package queue
import (
"context"
"time"
)
type Status struct {
Sessions int64
}
type Adapter interface {
Touch(ctx context.Context, queueName string, sessionId string) (int64, error)
Status(ctx context.Context, queueName string) (*Status, error)
Refresh(ctx context.Context, queueName string, keepAlive time.Duration) error
}