sync

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: BSD-2-Clause Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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