23 lines
632 B
Go
23 lines
632 B
Go
package ownership
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
proxyDomain "proxy-pool/internal/domain/proxy"
|
|
)
|
|
|
|
// SnapshotProxy is one currently assignable proxy in a Worker-specific view.
|
|
// LeaseExpiresAt bounds how long the view may remain valid without refresh.
|
|
type SnapshotProxy struct {
|
|
Proxy proxyDomain.Proxy
|
|
OwnershipEpoch uint64
|
|
LeaseExpiresAt time.Time
|
|
}
|
|
|
|
// SnapshotReader returns a complete bounded Worker view. Implementations must
|
|
// never silently truncate the result when the requested limit is exceeded.
|
|
type SnapshotReader interface {
|
|
ReadWorkerSnapshot(context.Context, string, int) ([]SnapshotProxy, error)
|
|
}
|