Documentation
¶
Overview ¶
Package environment provides domain-specific, field-level caching for Environment resources. EnvironmentCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for the resolved spec's identity fields (applicationName, environmentType, version, secretStoreProvider) and its child CR references (build, gitRepository, gitHubEvent, deployment, route, package, serviceUnits) — Environment being the aggregate root that ties the other CR kinds together. PublishResolved projects a *environmentResolution.ResolvedEnvironment into those fields, publishing each reference only when resolution actually populated it.
Index ¶
- type EnvironmentCache
- func (e *EnvironmentCache) GetApplicationName(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetBuild(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetDeployment(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetEnvironmentType(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetGitHubEvent(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetGitRepository(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetPackage(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetRoute(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) GetSecretStore(ctx context.Context, nn types.NamespacedName, gen int64) (environmentResolution.ResolvedSecretStore, bool, error)
- func (e *EnvironmentCache) GetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64) ([]string, bool, error)
- func (e *EnvironmentCache) GetVersion(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (e *EnvironmentCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, ...) error
- func (e *EnvironmentCache) SetApplicationName(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetBuild(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetDeployment(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetEnvironmentType(ctx context.Context, nn types.NamespacedName, gen int64, envType string) error
- func (e *EnvironmentCache) SetGitHubEvent(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetGitRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetPackage(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetRoute(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
- func (e *EnvironmentCache) SetSecretStore(ctx context.Context, nn types.NamespacedName, gen int64, ...) error
- func (e *EnvironmentCache) SetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64, units []string) error
- func (e *EnvironmentCache) SetVersion(ctx context.Context, nn types.NamespacedName, gen int64, version string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentCache ¶
type EnvironmentCache struct {
*bocache.ObjectCache
}
EnvironmentCache provides domain-specific, field-level caching for Environment resources.
func NewEnvironmentCache ¶
func NewEnvironmentCache(c *cache.Cache) *EnvironmentCache
NewEnvironmentCache constructs a new EnvironmentCache with the provided cache.Cache.
func (*EnvironmentCache) GetApplicationName ¶
func (e *EnvironmentCache) GetApplicationName(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetBuild ¶
func (e *EnvironmentCache) GetBuild(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetDeployment ¶
func (e *EnvironmentCache) GetDeployment(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetEnvironmentType ¶
func (e *EnvironmentCache) GetEnvironmentType(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetGitHubEvent ¶
func (e *EnvironmentCache) GetGitHubEvent(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetGitRepository ¶
func (e *EnvironmentCache) GetGitRepository(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetPackage ¶
func (e *EnvironmentCache) GetPackage(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetRoute ¶
func (e *EnvironmentCache) GetRoute(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) GetSecretStore ¶ added in v0.8.8
func (e *EnvironmentCache) GetSecretStore(ctx context.Context, nn types.NamespacedName, gen int64) (environmentResolution.ResolvedSecretStore, bool, error)
func (*EnvironmentCache) GetServiceUnits ¶
func (e *EnvironmentCache) GetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64) ([]string, bool, error)
func (*EnvironmentCache) GetVersion ¶
func (e *EnvironmentCache) GetVersion(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*EnvironmentCache) PublishResolved ¶
func (e *EnvironmentCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, r *environmentResolution.ResolvedEnvironment) error
PublishResolved writes the resolved environment contract as a generation-scoped, field-level projection. All writes are best-effort: failures cost queryability, never correctness. Returns the first error encountered for optional logging; callers must not fail reconciliation on it.
func (*EnvironmentCache) SetApplicationName ¶
func (e *EnvironmentCache) SetApplicationName(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetBuild ¶
func (e *EnvironmentCache) SetBuild(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetDeployment ¶
func (e *EnvironmentCache) SetDeployment(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetEnvironmentType ¶
func (e *EnvironmentCache) SetEnvironmentType(ctx context.Context, nn types.NamespacedName, gen int64, envType string) error
func (*EnvironmentCache) SetGitHubEvent ¶
func (e *EnvironmentCache) SetGitHubEvent(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetGitRepository ¶
func (e *EnvironmentCache) SetGitRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetPackage ¶
func (e *EnvironmentCache) SetPackage(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetRoute ¶
func (e *EnvironmentCache) SetRoute(ctx context.Context, nn types.NamespacedName, gen int64, name string) error
func (*EnvironmentCache) SetSecretStore ¶ added in v0.8.8
func (e *EnvironmentCache) SetSecretStore(ctx context.Context, nn types.NamespacedName, gen int64, ss environmentResolution.ResolvedSecretStore) error
func (*EnvironmentCache) SetServiceUnits ¶
func (e *EnvironmentCache) SetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64, units []string) error
func (*EnvironmentCache) SetVersion ¶
func (e *EnvironmentCache) SetVersion(ctx context.Context, nn types.NamespacedName, gen int64, version string) error