build

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package build provides domain-specific, field-level caching for Build resources. BuildCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for each resolved spec field (image, source, strategy, serviceAccount, policy), plus PublishResolved, which projects a *buildResolution.ResolvedBuild into those fields in one best-effort call after resolution succeeds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCache

type BuildCache struct {
	*bocache.ObjectCache
}

BuildCache provides domain-specific, field-level caching for Build resources.

func NewBuildCache

func NewBuildCache(c *cache.Cache) *BuildCache

NewBuildCache constructs a new BuildCache with the provided cache.Cache.

func (*BuildCache) GetImage

func (b *BuildCache) GetImage(ctx context.Context, nn types.NamespacedName, gen int64) (string, bool, error)

func (*BuildCache) GetPolicy

func (b *BuildCache) GetPolicy(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)

func (*BuildCache) GetServiceAccount

func (b *BuildCache) GetServiceAccount(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)

func (*BuildCache) GetSource

func (b *BuildCache) GetSource(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)

func (*BuildCache) GetStrategy

func (b *BuildCache) GetStrategy(ctx context.Context, nn types.NamespacedName, gen int64, into any) (bool, error)

func (*BuildCache) PublishResolved

func (b *BuildCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, r *buildResolution.ResolvedBuild) error

PublishResolved writes the resolved 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 (*BuildCache) SetImage

func (b *BuildCache) SetImage(ctx context.Context, nn types.NamespacedName, gen int64, image string) error

func (*BuildCache) SetPolicy

func (b *BuildCache) SetPolicy(ctx context.Context, nn types.NamespacedName, gen int64, policy any) error

func (*BuildCache) SetServiceAccount

func (b *BuildCache) SetServiceAccount(ctx context.Context, nn types.NamespacedName, gen int64, sa any) error

func (*BuildCache) SetSource

func (b *BuildCache) SetSource(ctx context.Context, nn types.NamespacedName, gen int64, source any) error

func (*BuildCache) SetStrategy

func (b *BuildCache) SetStrategy(ctx context.Context, nn types.NamespacedName, gen int64, strategy any) error

Jump to

Keyboard shortcuts

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