repository

package
v0.0.8-rc.7 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelsGetter added in v0.0.8

type LabelsGetter interface {
	GetLabels() map[string]string
}

type Logger added in v0.0.7

type Logger interface {
	Info(msg string, keysAndValues ...interface{})
}

type RepoCache

type RepoCache interface {
	Set(submitted, persisted *unstructured.Unstructured)
	UnchangedSinceCached(local *unstructured.Unstructured, remote []*unstructured.Unstructured) *unstructured.Unstructured
}

func NewCache

func NewCache(l Logger) RepoCache

type Repository

type Repository interface {
	EnsureObjectExistsOnCluster(ctx context.Context, obj *unstructured.Unstructured, allowUpdate bool) error
	GetClusterTemplate(ctx context.Context, ref v1alpha1.ClusterTemplateReference) (client.Object, error)
	GetDeliveryClusterTemplate(ctx context.Context, ref v1alpha1.DeliveryClusterTemplateReference) (client.Object, error)
	GetRunTemplate(ctx context.Context, ref v1alpha1.TemplateReference) (*v1alpha1.ClusterRunTemplate, error)
	GetSupplyChainsForWorkload(ctx context.Context, workload *v1alpha1.Workload) ([]*v1alpha1.ClusterSupplyChain, error)
	GetDeliveriesForDeliverable(ctx context.Context, deliverable *v1alpha1.Deliverable) ([]*v1alpha1.ClusterDelivery, error)
	GetWorkload(ctx context.Context, name string, namespace string) (*v1alpha1.Workload, error)
	GetDeliverable(ctx context.Context, name string, namespace string) (*v1alpha1.Deliverable, error)
	GetSupplyChain(ctx context.Context, name string) (*v1alpha1.ClusterSupplyChain, error)
	StatusUpdate(ctx context.Context, object client.Object) error
	GetRunnable(ctx context.Context, name string, namespace string) (*v1alpha1.Runnable, error)
	ListUnstructured(ctx context.Context, obj *unstructured.Unstructured) ([]*unstructured.Unstructured, error)
	GetDelivery(ctx context.Context, name string) (*v1alpha1.ClusterDelivery, error)
	GetScheme() *runtime.Scheme
	GetServiceAccountSecret(ctx context.Context, serviceAccountName, ns string) (*corev1.Secret, error)
}

func NewRepository

func NewRepository(client client.Client, repoCache RepoCache) Repository

type RepositoryBuilder added in v0.0.8

type RepositoryBuilder func(client client.Client, repoCache RepoCache) Repository

type SelectorGetter added in v0.0.8

type SelectorGetter interface {
	GetSelector() map[string]string
}

func BestLabelMatches added in v0.0.8

func BestLabelMatches(source LabelsGetter, targets []SelectorGetter) []SelectorGetter

BestLabelMatch attempts at finding the targets that best match the label set of the source.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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