Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBusy = errors.New("sync scope gate unavailable")
var ErrOriginal = errors.New("original charged sync owner unavailable")
Functions ¶
This section is empty.
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate excludes one original-scope native writer or verifier at a time. It supplies ordering, not durable ownership or quota evidence.
type Hold ¶
type Hold struct {
// contains filtered or unexported fields
}
Hold keeps the original gate and sole connection across native verification. Check may be repeated after the scan; Release is idempotent.
type Identity ¶
type Identity struct {
Key, Side, LeaseID, Host, Owner string
}
Identity names the original in-process preparation owner. A recovered SQL row cannot supply Live, which must be the exact original owner's context.
type Original ¶
type Original struct {
// contains filtered or unexported fields
}
Original binds one exact live owner, the sole Manager database pool, its mutex, and the shared native gate. This object cannot be reconstructed from a row after Manager restart. It has no cleanup or final-lease authority.
func BindOriginal ¶
func BindOriginal(ctx context.Context, db *sql.DB, managerMu *sync.Mutex, gate *Gate, live context.Context, clockRead func() (leaseclock.Sample, error), id Identity) (*Original, error)
BindOriginal is called only after the original lease and preparing row commit, under Manager's owner registration. The same lease/row is checked again on every held verification; the first read is not a cached proof.
func (*Original) HoldWriter ¶
HoldWriter rechecks the exact current original under a fresh writer token and retains the sole SQL connection through its following native effect. The caller also rechecks held roots and native quota before the effect.
func (*Original) Revoke ¶
func (o *Original) Revoke()
Revoke permanently removes in-process verification authority after an uncertain native effect. It cannot be rebuilt from the durable row.
type Record ¶
type Record struct {
Identity
Provider, ScopeID, MountID, ProjectRootID, SelectedRootID, HomeRootID string
EnrollmentDigest, OwnershipDigest string
ProjectID, OwnerEpoch, ChargedHard, InitialUsed, RowRevision int64
PreparationRevision int64
PreparationData string
State string
}
Record is copied durable evidence. The mutable row state is intentionally fixed at preparing in this first bridge; it cannot authorize handoff.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
type WriterHold ¶
type WriterHold struct {
// contains filtered or unexported fields
}
func (*WriterHold) Release ¶
func (h *WriterHold) Release()
Release closes the database exclusion. The caller then releases its writer gate after all native workers and any result handling have joined.