Documentation
¶
Overview ¶
Package deployment provides domain-specific, field-level caching for Deployment resources. DeploymentCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for each resolved spec field (serviceUnits, runtime, strategy, imageAutomation, reconciliationStrategy, gitOwner, manifestsRepo), plus PublishResolved, which projects a *deploymentResolution.ResolvedDeployment into those fields — mandatory fields unconditionally, optional ones only when resolution produced a non-empty value.
Index ¶
- type DeploymentCache
- func (d *DeploymentCache) GetGitOwner(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (d *DeploymentCache) GetImageAutomation(ctx context.Context, nn types.NamespacedName, gen int64) (bool, bool, error)
- func (d *DeploymentCache) GetManifestsRepo(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)
- func (d *DeploymentCache) GetReconciliationStrategy(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (d *DeploymentCache) GetRuntime(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (d *DeploymentCache) GetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64) ([]string, bool, error)
- func (d *DeploymentCache) GetStrategy(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
- func (d *DeploymentCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, ...) error
- func (d *DeploymentCache) SetGitOwner(ctx context.Context, nn types.NamespacedName, gen int64, owner string) error
- func (d *DeploymentCache) SetImageAutomation(ctx context.Context, nn types.NamespacedName, gen int64, enabled bool) error
- func (d *DeploymentCache) SetManifestsRepo(ctx context.Context, nn types.NamespacedName, gen int64, repo any) error
- func (d *DeploymentCache) SetReconciliationStrategy(ctx context.Context, nn types.NamespacedName, gen int64, strategy string) error
- func (d *DeploymentCache) SetRuntime(ctx context.Context, nn types.NamespacedName, gen int64, runtime string) error
- func (d *DeploymentCache) SetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64, units []string) error
- func (d *DeploymentCache) SetStrategy(ctx context.Context, nn types.NamespacedName, gen int64, strategy string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentCache ¶
type DeploymentCache struct {
*bocache.ObjectCache
}
DeploymentCache provides domain-specific, field-level caching for Deployment resources.
func NewDeploymentCache ¶
func NewDeploymentCache(c *cache.Cache) *DeploymentCache
NewDeploymentCache constructs a new DeploymentCache with the provided cache.Cache.
func (*DeploymentCache) GetGitOwner ¶
func (d *DeploymentCache) GetGitOwner(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*DeploymentCache) GetImageAutomation ¶
func (d *DeploymentCache) GetImageAutomation(ctx context.Context, nn types.NamespacedName, gen int64) (bool, bool, error)
func (*DeploymentCache) GetManifestsRepo ¶
func (d *DeploymentCache) GetManifestsRepo(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)
func (*DeploymentCache) GetReconciliationStrategy ¶
func (d *DeploymentCache) GetReconciliationStrategy(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*DeploymentCache) GetRuntime ¶
func (d *DeploymentCache) GetRuntime(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*DeploymentCache) GetServiceUnits ¶
func (d *DeploymentCache) GetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64) ([]string, bool, error)
func (*DeploymentCache) GetStrategy ¶
func (d *DeploymentCache) GetStrategy(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)
func (*DeploymentCache) PublishResolved ¶
func (d *DeploymentCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, r *deploymentResolution.ResolvedDeployment) error
PublishResolved writes the resolved deployment 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 should not fail reconciliation on it.
func (*DeploymentCache) SetGitOwner ¶
func (d *DeploymentCache) SetGitOwner(ctx context.Context, nn types.NamespacedName, gen int64, owner string) error
func (*DeploymentCache) SetImageAutomation ¶
func (d *DeploymentCache) SetImageAutomation(ctx context.Context, nn types.NamespacedName, gen int64, enabled bool) error
func (*DeploymentCache) SetManifestsRepo ¶
func (d *DeploymentCache) SetManifestsRepo(ctx context.Context, nn types.NamespacedName, gen int64, repo any) error
func (*DeploymentCache) SetReconciliationStrategy ¶
func (d *DeploymentCache) SetReconciliationStrategy(ctx context.Context, nn types.NamespacedName, gen int64, strategy string) error
func (*DeploymentCache) SetRuntime ¶
func (d *DeploymentCache) SetRuntime(ctx context.Context, nn types.NamespacedName, gen int64, runtime string) error
func (*DeploymentCache) SetServiceUnits ¶
func (d *DeploymentCache) SetServiceUnits(ctx context.Context, nn types.NamespacedName, gen int64, units []string) error
func (*DeploymentCache) SetStrategy ¶
func (d *DeploymentCache) SetStrategy(ctx context.Context, nn types.NamespacedName, gen int64, strategy string) error