reconcile

package
v0.45.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventEnqueuer

type EventEnqueuer interface {
	Enqueue(event git.Event) bool
}

EventEnqueuer enqueues live events onto a branch worker (allows mocking). Enqueue reports whether the event entered the worker's FIFO; a false return means the queue was full and the event was dropped, so the caller must not advance a durable watch cursor past it.

type GitTargetEventStream

type GitTargetEventStream struct {
	// contains filtered or unexported fields
}

GitTargetEventStream forwards a GitTarget's live events to its branch worker. Every event a target watch routes after the replay travels this route: a full object write, a DELETE (which carries no object payload, only the identity to remove), and a /scale subresource translated into a parent-manifest field patch. Only a payload-less event that is none of those carries nothing to write, and it is dropped here.

It is deliberately thin, holding no buffer and no content hash. "Newer?" is answered by the watch's own resourceVersion ordering, and "changed?" by the writer's no-op detection (manifestedit.Decide at the commit boundary). See docs/architecture.md.

func NewGitTargetEventStream

func NewGitTargetEventStream(
	gitTargetName, gitTargetNamespace string,
	branchWorker EventEnqueuer,
	logger logr.Logger,
) *GitTargetEventStream

NewGitTargetEventStream creates a new event stream for a GitTarget.

func (*GitTargetEventStream) OnWatchEvent

func (s *GitTargetEventStream) OnWatchEvent(event git.Event) error

OnWatchEvent forwards a live event to the GitTarget's branch worker. An event with no object payload that is neither a DELETE nor a field patch carries nothing to write and is dropped (returns nil — there is nothing to durably hand off). It returns a non-nil error only when the worker's queue is full and a real event was dropped, so the watch loop does not advance its durable cursor past an event the worker never accepted: the watch reconnects from the un-advanced cursor and redelivers, which is safe because the writer's no-op detection at the commit boundary makes redelivery idempotent.

func (*GitTargetEventStream) String

func (s *GitTargetEventStream) String() string

String returns a string representation for debugging.

Jump to

Keyboard shortcuts

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