runtime

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 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 ContainerFn

type ContainerFn struct {
	Ctx  context.Context
	Path types.UniquePath
	// Image is the container image to run
	Image string
	// Container function will be killed after this timeour.
	// The default value is 5 minutes.
	Timeout time.Duration
	Perm    ContainerFnPermission
}

ContainerFn implements a KRMFn which run a containerized KRM function

func (*ContainerFn) Run

func (f *ContainerFn) Run(reader io.Reader, writer io.Writer) error

Run runs the container function using docker runtime. It reads the input from the given reader and writes the output to the provided writer.

type ContainerFnPermission

type ContainerFnPermission struct {
	AllowNetwork bool
}

ContainerFnPermission contains the permission of container function such as network access.

type ContainerFnWrapper

type ContainerFnWrapper struct {
	Fn *ContainerFn
}

ContainerFnWrapper wraps the real function filter, prints the function running progress and failures.

func (*ContainerFnWrapper) Run

func (fw *ContainerFnWrapper) Run(r io.Reader, w io.Writer) error

Jump to

Keyboard shortcuts

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