fn

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 3 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

This section is empty.

Functions

This section is empty.

Types

type FunctionRunner

type FunctionRunner interface {
	// Run method accepts resourceList in wireformat and returns resourceList in wire format.
	Run(r io.Reader, w io.Writer) error
}

FunctionRunner knows how to run a function.

type FunctionRuntime

type FunctionRuntime interface {
	GetRunner(ctx context.Context, fn *kptfilev1.Function) (FunctionRunner, error)
}

FunctionRuntime provides a way to obtain a function runner to be used for a given function configuration. If the function is not found, this should return an error that includes a NotFoundError in the chain.

type MultiRuntime

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

MultiRuntime is a compound FunctionRuntime that will use the first available runner.

func NewMultiRuntime

func NewMultiRuntime(runtimes []FunctionRuntime) *MultiRuntime

NewMultiRuntime builds a MultiRuntime.

func (*MultiRuntime) Add

func (r *MultiRuntime) Add(runtime FunctionRuntime)

Add adds the provided runtime to the end of the MultiRuntime list.

func (*MultiRuntime) GetRunner

GetRunner implements FunctionRuntime

type NotFoundError

type NotFoundError struct {
	Function kptfilev1.Function
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type RenderOptions

type RenderOptions struct {
	PkgPath string
	Runtime FunctionRuntime

	// Deprecated: use RunnerOptions.PackageName instead
	//
	// DisplayName is a human-readable name used for logs and diagnostics.
	// It is not intended to be a unique or stable identifier; if empty, no
	// explicit display name was provided.
	DisplayName string
}

type Renderer

type Renderer interface {
	Render(ctx context.Context, pkg filesys.FileSystem, opts RenderOptions) (*fnresultv1.ResultList, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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