Documentation
¶
Overview ¶
Package platform holds the process-local materialized-platform store: a single-slot, concurrency-safe holder of the current *materialize.MaterializedPlatform built from the cluster-singleton Platform CR. It is written by the PlatformReconciler and read (in a later slice) by the render path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds at most one materialized platform, keyed on the Platform CR's .metadata.generation it was built for. Enhancement 0001 §8.3: one global Platform per cluster needs one slot, not the library's content-hash LRU.
The held *MaterializedPlatform is safe for concurrent read-only sharing (library v0.17 guarantee), so the RWMutex lets future render-path readers run concurrently with reconciler writes.
func (*Store) Clear ¶
func (s *Store) Clear()
Clear drops the held platform so the store reports no platform held. Called when the Platform CR is deleted.
func (*Store) Generation ¶
Generation returns the .metadata.generation the held platform was built for, or 0 when no platform is held.
func (*Store) Get ¶
func (s *Store) Get() (*materialize.MaterializedPlatform, bool)
Get returns the held materialized platform and true, or (nil, false) when no platform is held. Safe for concurrent callers.
func (*Store) Set ¶
func (s *Store) Set(gen int64, mp *materialize.MaterializedPlatform)
Set replaces the held platform with mp, recording the generation it was built for. A later Set with a newer generation replaces the slot.