22 lines
450 B
Go
22 lines
450 B
Go
package worker
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
controlplanev1 "proxy-pool/gen/controlplane/v1"
|
|
)
|
|
|
|
var ErrSnapshotsUnavailable = errors.New("worker snapshots are unavailable")
|
|
|
|
type SnapshotWatchRequest struct {
|
|
WorkerID string
|
|
SessionID string
|
|
LastAppliedVersion uint64
|
|
LastChecksum []byte
|
|
}
|
|
|
|
type SnapshotSource interface {
|
|
Watch(context.Context, SnapshotWatchRequest) (<-chan *controlplanev1.WorkerSnapshot, error)
|
|
}
|