Documentation
¶
Overview ¶
Package githubevent provides domain-specific, field-level caching for GitHubEvent resources. GitHubEventCache embeds cache.ObjectCache and adds typed Set* / Get* helpers for each resolved spec field (repository, eventType, ref, webhook), plus PublishResolved, which projects a *githubeventResolution.ResolvedGitHubEvent into those fields after resolution succeeds.
Index ¶
- type GitHubEventCache
- func (g *GitHubEventCache) GetEventType(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
- func (g *GitHubEventCache) GetRef(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
- func (g *GitHubEventCache) GetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
- func (g *GitHubEventCache) GetWebhook(ctx context.Context, nn types.NamespacedName, gen int64, name string, into any) (bool, error)
- func (g *GitHubEventCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, ...) error
- func (g *GitHubEventCache) SetEventType(ctx context.Context, nn types.NamespacedName, gen int64, name string, ...) error
- func (g *GitHubEventCache) SetRef(ctx context.Context, nn types.NamespacedName, gen int64, name string, ...) error
- func (g *GitHubEventCache) SetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string, ...) error
- func (g *GitHubEventCache) SetWebhook(ctx context.Context, nn types.NamespacedName, gen int64, name string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubEventCache ¶
type GitHubEventCache struct {
*bocache.ObjectCache
}
GitHubEventCache provides domain-specific, field-level caching for GitHubEvent resources.
func NewGitHubEventCache ¶
func NewGitHubEventCache(c *cache.Cache) *GitHubEventCache
NewGitHubEventCache constructs a new GitHubEventCache with the provided cache.Cache.
func (*GitHubEventCache) GetEventType ¶
func (g *GitHubEventCache) GetEventType(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
func (*GitHubEventCache) GetRef ¶
func (g *GitHubEventCache) GetRef(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
func (*GitHubEventCache) GetRepository ¶
func (g *GitHubEventCache) GetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string) (string, bool, error)
func (*GitHubEventCache) GetWebhook ¶
func (g *GitHubEventCache) GetWebhook(ctx context.Context, nn types.NamespacedName, gen int64, name string, into any) (bool, error)
func (*GitHubEventCache) PublishResolved ¶
func (g *GitHubEventCache) PublishResolved(ctx context.Context, nn types.NamespacedName, gen int64, r *githubeventResolution.ResolvedGitHubEvent) error
PublishResolved writes the resolved event 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 (*GitHubEventCache) SetEventType ¶
func (g *GitHubEventCache) SetEventType(ctx context.Context, nn types.NamespacedName, gen int64, name string, eventType string) error
func (*GitHubEventCache) SetRef ¶
func (g *GitHubEventCache) SetRef(ctx context.Context, nn types.NamespacedName, gen int64, name string, ref string) error
func (*GitHubEventCache) SetRepository ¶
func (g *GitHubEventCache) SetRepository(ctx context.Context, nn types.NamespacedName, gen int64, name string, repo string) error
func (*GitHubEventCache) SetWebhook ¶
func (g *GitHubEventCache) SetWebhook(ctx context.Context, nn types.NamespacedName, gen int64, name string, webhook any) error