repository

package
v0.0.6-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CacheExpiryDuration = 1 * time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpiringCache

type ExpiringCache interface {
	Get(key interface{}) (val interface{}, ok bool)
	Set(key interface{}, val interface{}, ttl time.Duration)
}

type RepoCache

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

func NewCache

func NewCache(c ExpiringCache) RepoCache

type Repository

type Repository interface {
	EnsureObjectExistsOnCluster(obj *unstructured.Unstructured, allowUpdate bool) error
	GetClusterTemplate(reference v1alpha1.ClusterTemplateReference) (templates.Template, error)
	GetRunTemplate(reference v1alpha1.TemplateReference) (templates.RunTemplate, error)
	GetSupplyChainsForWorkload(workload *v1alpha1.Workload) ([]v1alpha1.ClusterSupplyChain, error)
	GetWorkload(name string, namespace string) (*v1alpha1.Workload, error)
	GetSupplyChain(name string) (*v1alpha1.ClusterSupplyChain, error)
	StatusUpdate(object client.Object) error
	GetScheme() *runtime.Scheme
	GetPipeline(name string, namespace string) (*v1alpha1.Pipeline, error)
}

func NewRepository

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

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