Documentation
¶
Overview ¶
Package syncer is the daemon's sync engine: scan, spool, read, batch, upload; state advances only on ACK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
Root string // Claude projects dir
State *state.DB
Spool *spool.Spool
Up Uploader
MaxBatchBytes int // uncompressed line bytes per request, default 4 MiB
MaxBatchLines int // default 5000
Now func() time.Time
MaxLine int // lines and snapshots above this many bytes are never uploaded, only recorded as skipped; default protocol.MaxLineBytes
// contains filtered or unexported fields
}
Engine runs sync passes.
type Result ¶
type Result struct {
Uploaded int64 // bytes acked in this pass
PendingFiles int // files still behind
}
Result summarises a pass.
type Uploader ¶
type Uploader interface {
Ingest(ctx context.Context, req protocol.IngestRequest) (protocol.IngestResponse, error)
Files(ctx context.Context) ([]protocol.RemoteFile, error)
}
Uploader is the server API the engine needs (satisfied by client.Client).