Help us shape the future of Go! Take the 2026 Go Developer Survey

sync

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterFilter added in v0.14.0

type ClusterFilter struct {
	// Cluster is the cluster this controller runs in. Empty disables the
	// filter, so every task is published as before the field existed.
	Cluster string
	// PublishUntagged controls whether a task without a cluster field is
	// published. Only the cluster that owns untagged tasks sets it.
	PublishUntagged bool
}

ClusterFilter decides whether this controller publishes a task, based on the task's optional "cluster" frontmatter field.

func (ClusterFilter) ShouldPublish added in v0.14.0

func (f ClusterFilter) ShouldPublish(task lib.Task) bool

ShouldPublish reports whether the task belongs to this controller's cluster.

type SyncLoop

type SyncLoop interface {
	Run(ctx context.Context) error
	Trigger()
}

SyncLoop orchestrates scanning and publishing of task events.

func NewSyncLoop

func NewSyncLoop(
	scanner scanner.VaultScanner,
	publisher publisher.TaskPublisher,
	trigger chan struct{},
	metrics metrics.Metrics,
	clusterFilter ClusterFilter,
) SyncLoop

NewSyncLoop creates a SyncLoop that connects scanner results to publisher calls.

Jump to

Keyboard shortcuts

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