gitrepository

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package gitrepository provides domain-specific, field-level caching for GitRepository resources. GitRepositoryCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for each resolved spec field (provider, hookUrl, repository, webhooks), plus PublishResolved, which projects a *gitrepositoryResolution.ResolvedGitRepository into those fields — hookUrl and webhooks only when resolution actually populated them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRepositoryCache

type GitRepositoryCache struct {
	*bocache.ObjectCache
}

GitRepositoryCache provides domain-specific, field-level caching for GitRepository resources.

func NewGitRepositoryCache

func NewGitRepositoryCache(c *cache.Cache) *GitRepositoryCache

NewGitRepositoryCache constructs a new GitRepositoryCache with the provided cache.Cache.

func (*GitRepositoryCache) GetHookURL

func (g *GitRepositoryCache) GetHookURL(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)

func (*GitRepositoryCache) GetProvider

func (g *GitRepositoryCache) GetProvider(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)

func (*GitRepositoryCache) GetRepository

func (g *GitRepositoryCache) GetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string, into any) (bool, error)

func (*GitRepositoryCache) GetWebhooks

func (g *GitRepositoryCache) GetWebhooks(ctx context.Context, nn types.NamespacedName, gen int64, name string, into any) (bool, error)

func (*GitRepositoryCache) PublishResolved

PublishResolved writes the resolved repository 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 (*GitRepositoryCache) SetHookURL

func (g *GitRepositoryCache) SetHookURL(ctx context.Context, nn types.NamespacedName, gen int64, name string, url string) error

func (*GitRepositoryCache) SetProvider

func (g *GitRepositoryCache) SetProvider(ctx context.Context, nn types.NamespacedName, gen int64, name string, provider string) error

func (*GitRepositoryCache) SetRepository

func (g *GitRepositoryCache) SetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string, repo any) error

func (*GitRepositoryCache) SetWebhooks

func (g *GitRepositoryCache) SetWebhooks(ctx context.Context, nn types.NamespacedName, gen int64, name string, webhooks any) error

Jump to

Keyboard shortcuts

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