platform

package
v1.0.0-alpha.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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 NewStore

func NewStore() *Store

NewStore returns an empty Store holding no platform.

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

func (s *Store) Generation() int64

Generation returns the .metadata.generation the held platform was built for, or 0 when no platform is held.

func (*Store) Get

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL