sync

package
v1.5.10-test Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 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

View Source
var ErrRepositoryNotFound = fmt.Errorf("repository not found")

ErrRepositoryNotFound is returned when the repository CRD no longer exists

Functions

func SetRepositoryCondition

func SetRepositoryCondition(ctx context.Context, coreClient client.WithWatch, repoKey repository.RepositoryKey, status util.RepositoryStatus, syncError error, nextSyncTime *time.Time) error

SetRepositoryCondition sets the repository condition status

Types

type SyncHandler

type SyncHandler interface {
	// SyncOnce performs a single sync operation
	SyncOnce(ctx context.Context) error
	// Key returns the repository key
	Key() repository.RepositoryKey
	// GetSpec returns the repository spec
	GetSpec() *configapi.Repository
}

SyncHandler defines the interface for repository sync operations

type SyncManager

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

SyncManager handles repository synchronization with scheduling

func NewSyncManager

func NewSyncManager(handler SyncHandler, coreClient client.WithWatch) *SyncManager

NewSyncManager creates a new sync manager

func (*SyncManager) GetLastSyncError

func (m *SyncManager) GetLastSyncError() error

GetLastSyncError returns the last sync error

func (*SyncManager) SetRepositoryCondition

func (m *SyncManager) SetRepositoryCondition(ctx context.Context, status util.RepositoryStatus) error

func (*SyncManager) Start

func (m *SyncManager) Start(ctx context.Context, defaultSyncFrequency time.Duration)

Start begins the sync process with periodic and one-time scheduling

func (*SyncManager) Stop

func (m *SyncManager) Stop()

Stop stops the sync manager

Jump to

Keyboard shortcuts

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