fn

package
v1.0.0-beta.50 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 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 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 *v1.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

func (r *MultiRuntime) GetRunner(ctx context.Context, fn *v1.Function) (FunctionRunner, error)

GetRunner implements FunctionRuntime

type NotFoundError

type NotFoundError struct {
	Function v1.Function
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type RenderOptions

type RenderOptions struct {
	PkgPath string
	Runtime FunctionRuntime
}

type Renderer

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

Jump to

Keyboard shortcuts

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