xfn

package
v1.14.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package xfn contains functionality for running Composition Functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackagedFunctionRunner added in v1.14.0

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

A PackagedFunctionRunner runs a Function by making a gRPC call to a Function package's runtime. It creates a gRPC client connection for each Function. The Function's endpoint is determined by reading the status.endpoint of the active FunctionRevision. You must call GarbageCollectClientConnections in order to ensure connections are properly closed.

func NewPackagedFunctionRunner added in v1.14.0

func NewPackagedFunctionRunner(c client.Reader, o ...PackagedFunctionRunnerOption) *PackagedFunctionRunner

NewPackagedFunctionRunner returns a FunctionRunner that runs a Function by making a gRPC call to a Function package's runtime.

func (*PackagedFunctionRunner) GarbageCollectConnections added in v1.14.0

func (r *PackagedFunctionRunner) GarbageCollectConnections(ctx context.Context, interval time.Duration)

GarbageCollectConnections runs every interval until the supplied context is cancelled. It garbage collects gRPC client connections to Functions that are no longer installed.

func (*PackagedFunctionRunner) GarbageCollectConnectionsNow added in v1.14.0

func (r *PackagedFunctionRunner) GarbageCollectConnectionsNow(ctx context.Context) (int, error)

GarbageCollectConnectionsNow immediately garbage collects any gRPC client connections to Functions that are no longer installed. It returns the number of connections garbage collected.

func (*PackagedFunctionRunner) RunFunction added in v1.14.0

RunFunction sends the supplied RunFunctionRequest to the named Function. The function is expected to be an installed Function.pkg.crossplane.io package.

type PackagedFunctionRunnerOption added in v1.14.0

type PackagedFunctionRunnerOption func(r *PackagedFunctionRunner)

A PackagedFunctionRunnerOption configures a PackagedFunctionRunner.

func WithLogger

WithLogger configures the logger the PackageFunctionRunner should use.

func WithTLSConfig added in v1.14.0

func WithTLSConfig(cfg *tls.Config) PackagedFunctionRunnerOption

WithTLSConfig configures the client TLS the PackageFunctionRunner should use.

Jump to

Keyboard shortcuts

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