Documentation
¶
Index ¶
- Constants
- Variables
- type Generation
- type Record
- type Source
- type Store
- func (s *Store) Changes() <-chan struct{}
- func (s *Store) Diagnostics() StoreDiagnostics
- func (s *Store) ExcludeExactRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
- func (s *Store) ExcludeRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
- func (s *Store) Publish(source Source, value protocol.Observation) error
- func (s *Store) ReleaseExactRevisionReservationWithoutSignal(id presentation.Identity, generation, revision uint64)
- func (s *Store) ReserveExactRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
- func (s *Store) Sequence() uint64
- func (s *Store) Signal()
- func (s *Store) Snapshot() []Record
- func (s *Store) SnapshotWithSequence() ([]Record, uint64)
- func (s *Store) Withdraw(pluginID, instanceID, channel, key string) error
- func (s *Store) WithdrawGeneration(pluginID string, generation uint64)
- func (s *Store) WithdrawInstance(pluginID, instanceID string, throughGeneration uint64)
- type StoreDiagnostics
Constants ¶
const (
CapacityRejectionCode = "observation_capacity"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Generation ¶
Generation resolves the current core-owned generation for an app instance.
type Record ¶
type Record struct {
PluginID string
Generation uint64
AdmissionSequence uint64
Observation protocol.Observation
}
Record is an observation plus identity that plugins cannot provide themselves.
func (Record) Identity ¶
func (r Record) Identity() presentation.Identity
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store owns the latest unresolved observation for each stable identity.
func (*Store) Diagnostics ¶
func (s *Store) Diagnostics() StoreDiagnostics
Diagnostics returns only core-generated counts, timestamps, and stable codes.
func (*Store) ExcludeExactRevisionWithoutSignal ¶
func (s *Store) ExcludeExactRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
ExcludeExactRevisionWithoutSignal advances a process-local revision watermark even when the producer withdrew the live record before the host completed a Back fallback. A later revision or generation remains eligible.
func (*Store) ExcludeRevisionWithoutSignal ¶
func (s *Store) ExcludeRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
ExcludeRevisionWithoutSignal excludes one deterministic revision from arbitration without waking the engine. Callers decide whether to continue local selection or stop until a later observation naturally signals work.
func (*Store) Publish ¶
func (s *Store) Publish(source Source, value protocol.Observation) error
Publish validates identity/generation and applies a strictly newer revision.
func (*Store) ReleaseExactRevisionReservationWithoutSignal ¶
func (s *Store) ReleaseExactRevisionReservationWithoutSignal(id presentation.Identity, generation, revision uint64)
ReleaseExactRevisionReservationWithoutSignal removes only a matching Back reservation. A committed exclusion watermark remains intact.
func (*Store) ReserveExactRevisionWithoutSignal ¶
func (s *Store) ReserveExactRevisionWithoutSignal(id presentation.Identity, generation, revision uint64) bool
ReserveExactRevisionWithoutSignal preserves proof that one exact live revision was admitted while a synchronous Back callback is in flight.
func (*Store) Sequence ¶
Sequence identifies the latest accepted observation-state mutation. Signals and internal exact-revision exclusions do not advance it.
func (*Store) Signal ¶
func (s *Store) Signal()
Signal requests reevaluation after core-owned state such as acknowledgement changes.
func (*Store) SnapshotWithSequence ¶
SnapshotWithSequence returns one owned snapshot and the accepted mutation sequence that produced it.
func (*Store) WithdrawGeneration ¶
WithdrawGeneration removes only records emitted by one child generation.
func (*Store) WithdrawInstance ¶
WithdrawInstance removes retained observations through the last generation owned by a deleted app while preserving any later same-ID recreation.
type StoreDiagnostics ¶
type StoreDiagnostics struct {
LiveCount int `json:"live_count"`
CapacityRejections uint64 `json:"capacity_rejections"`
LastRejectionAt time.Time `json:"last_rejection_at,omitempty"`
LastRejectionCode string `json:"last_rejection_code,omitempty"`
}
StoreDiagnostics is a bounded, redacted view of observation-store health.