engine

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 49 Imported by: 2

Documentation

Overview

Implementation of package orchestration engine The engine is independent of k8s runtime (k8s apiserver integration is in apiserver module)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePatch

func GeneratePatch(fileName string, oldV, newV string) (api.PatchSpec, error)

GeneratePatch returns patch operations for transforming from oldV to newV.

Types

type CaDEngine

type CaDEngine interface {
	// ObjectCache() is a cache of all our objects.
	ObjectCache() cache.ObjectCache

	UpdatePackageResources(ctx context.Context, repositoryObj *configapi.Repository, oldPackage repository.PackageRevision, old, new *api.PackageRevisionResources) (repository.PackageRevision, error)
	ListFunctions(ctx context.Context, repositoryObj *configapi.Repository) ([]repository.Function, error)

	ListPackageRevisions(ctx context.Context, repositorySpec *configapi.Repository, filter repository.ListPackageRevisionFilter) ([]repository.PackageRevision, error)
	CreatePackageRevision(ctx context.Context, repositoryObj *configapi.Repository, obj *api.PackageRevision) (repository.PackageRevision, error)
	UpdatePackageRevision(ctx context.Context, repositoryObj *configapi.Repository, oldPackage repository.PackageRevision, old, new *api.PackageRevision) (repository.PackageRevision, error)
	DeletePackageRevision(ctx context.Context, repositoryObj *configapi.Repository, obj repository.PackageRevision) error

	ListPackages(ctx context.Context, repositorySpec *configapi.Repository, filter repository.ListPackageFilter) ([]repository.Package, error)
	CreatePackage(ctx context.Context, repositoryObj *configapi.Repository, obj *api.Package) (repository.Package, error)
	UpdatePackage(ctx context.Context, repositoryObj *configapi.Repository, oldPackage repository.Package, old, new *api.Package) (repository.Package, error)
	DeletePackage(ctx context.Context, repositoryObj *configapi.Repository, obj repository.Package) error
}

func NewCaDEngine

func NewCaDEngine(opts ...EngineOption) (CaDEngine, error)

type EngineOption

type EngineOption interface {
	// contains filtered or unexported methods
}

func WithBuiltinFunctionRuntime

func WithBuiltinFunctionRuntime() EngineOption

func WithCache

func WithCache(cache *cache.Cache) EngineOption

func WithCredentialResolver

func WithCredentialResolver(resolver repository.CredentialResolver) EngineOption

func WithFunctionRuntime

func WithFunctionRuntime(runtime fn.FunctionRuntime) EngineOption

func WithGRPCFunctionRuntime

func WithGRPCFunctionRuntime(address string) EngineOption

func WithReferenceResolver

func WithReferenceResolver(resolver ReferenceResolver) EngineOption

func WithRenderer

func WithRenderer(renderer fn.Renderer) EngineOption

func WithSimpleFunctionRuntime

func WithSimpleFunctionRuntime() EngineOption

func WithUserInfoProvider

func WithUserInfoProvider(provider repository.UserInfoProvider) EngineOption

type EngineOptionFunc

type EngineOptionFunc func(engine *cadEngine) error

type NodeToMapWriter

type NodeToMapWriter struct {
	Resources map[string]string
}

type Object

type Object interface {
	metav1.Object
	runtime.Object
}

type PackageFetcher

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

func (*PackageFetcher) FetchResources

func (p *PackageFetcher) FetchResources(ctx context.Context, packageRef *api.PackageRevisionRef, namespace string) (*api.PackageRevisionResources, error)

func (*PackageFetcher) FetchRevision

func (p *PackageFetcher) FetchRevision(ctx context.Context, packageRef *api.PackageRevisionRef, namespace string) (repository.PackageRevision, error)

type ReferenceResolver

type ReferenceResolver interface {
	ResolveReference(ctx context.Context, namespace, name string, result Object) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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