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

syncsource

package
v1.25.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitSyncSource

type GitSyncSource struct {
	// Repository is a reference to the repository to fetch & sync from.
	Repository gitproviders.Repository
	// Branch is the Git branch to fetch & sync.
	Branch string
	// Revision is the GitRef (branch, tag, ref, or commit) to fetch & sync.
	Revision string
	// SourceFormat of the repository
	SourceFormat configsync.SourceFormat
	// Directory is the path within the repository to sync to the cluster.
	Directory string
	// ExpectedDirectory is the path within the source to sync to the cluster.
	// Used to validate the RSync status.
	ExpectedDirectory string
	// ExpectedCommit is the Git commit expected to be pulled by the reconciler.
	// Used to validate the RSync status.
	ExpectedCommit string
}

GitSyncSource is the "git" source, backed by a Git repository.

func (*GitSyncSource) Commit

func (s *GitSyncSource) Commit() (string, error)

Commit returns the current commit hash targeted by the local git repository.

func (*GitSyncSource) Path

func (s *GitSyncSource) Path() string

Path within the git repository to sync to the cluster.

func (*GitSyncSource) String

func (s *GitSyncSource) String() string

func (*GitSyncSource) Type

Type returns the SourceType of this source.

type HelmSyncSource

type HelmSyncSource struct {
	// ChartID is the ID of the Helm chart.
	// Used to set the RSync spec.
	ChartID registryproviders.HelmChartID
	// ExpectedChartVersion is the version of the Helm chart.
	// Used to validate the RSync status.
	ExpectedChartVersion string
}

HelmSyncSource is the "helm" source, backed by a Helm chart.

func (*HelmSyncSource) Commit

func (s *HelmSyncSource) Commit() (string, error)

Commit returns the version of the current chart.

func (*HelmSyncSource) Path

func (s *HelmSyncSource) Path() string

Path returns the name of the current chart.

func (*HelmSyncSource) String

func (s *HelmSyncSource) String() string

func (*HelmSyncSource) Type

Type returns the SourceType of this source.

type OCISyncSource

type OCISyncSource struct {
	// ImageID is the ID of the OCI image.
	// Used to set the RSync spec.
	ImageID registryproviders.OCIImageID
	// Directory is the path within the OCI image to sync to the cluster.
	// Used to set the RSync spec.
	Directory string
	// ExpectedDirectory is the path within the OCI image to sync to the cluster.
	// Used to validate the RSync status.
	ExpectedDirectory string
	// ImageDigest of the OCI image, including "sha256:" prefix.
	// Used to validate the RSync status.
	ExpectedImageDigest string
}

OCISyncSource is the "oci" source, backed by an OCI image.

func (*OCISyncSource) Commit

func (s *OCISyncSource) Commit() (string, error)

Commit is not yet implemented.

func (*OCISyncSource) Path

func (s *OCISyncSource) Path() string

Path within the OCI image to sync to the cluster.

func (*OCISyncSource) String

func (s *OCISyncSource) String() string

func (*OCISyncSource) Type

Type returns the SourceType of this source.

type Set

type Set map[core.ID]SyncSource

Set of RootSync & RepoSync IDs that map to SyncSources.

func (Set) GitSyncSources

func (s Set) GitSyncSources() Set

GitSyncSources returns a Set that only contains RootSyncs & RepoSyncs using GitSyncSources.

func (Set) HelmSyncSources

func (s Set) HelmSyncSources() Set

HelmSyncSources returns a Set that only contains RootSyncs & RepoSyncs using HelmSyncSources.

func (Set) OCISyncSources

func (s Set) OCISyncSources() Set

OCISyncSources returns a Set that only contains RootSyncs & RepoSyncs using OCISyncSources.

func (Set) RepoSyncs

func (s Set) RepoSyncs() Set

RepoSyncs returns a Set that only contains the RepoSync IDs and their SyncSources.

func (*Set) Reset

func (s *Set) Reset()

Reset clears the Set.

func (Set) RootSyncs

func (s Set) RootSyncs() Set

RootSyncs returns a Set that only contains the RootSync IDs and their SyncSources.

type SyncSource

type SyncSource interface {
	// Type returns the SourceType of this source.
	Type() configsync.SourceType
	// Commit returns the current/latest "commit" for this source.
	// The value is used to validate RSync status and metrics.
	Commit() (string, error)
	// Path within the source to sync to the cluster.
	// For Helm charts, the value represents the chart name instead.
	// The value is used to validate RSync status.
	Path() string
}

SyncSource describes the common methods available on all sources of truth.

Jump to

Keyboard shortcuts

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