plugin

package
v13.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryable

func IsRetryable(err error) bool

IsRetryable reports whether err is worth retrying against the same plugin. ExecError is never retryable; it carries an exit code from user code.

func StatusCode

func StatusCode(err error) codes.Code

StatusCode walks the wrap chain and returns the first gRPC status code, or codes.Unknown if none is present.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, address string, options ...ClientOption) (*Client, error)

NewClient connects to a BackendPlugin: a plugin that owns the whole execution environment and every container operation within it.

func (*Client) Capabilities

func (c *Client) Capabilities() *pluginv1alpha.CapabilitiesResponse

func (*Client) Close

func (c *Client) Close() error

func (*Client) NewEnvironment

func (c *Client) NewEnvironment(input *container.NewContainerInput, backendOpts map[string]string, labelArg string, timeout time.Duration) container.ExecutionsEnvironment

type ClientOption

type ClientOption func(*clientOptions)

func WithAllowPlainTCP

func WithAllowPlainTCP() ClientOption

WithAllowPlainTCP allows TCP without TLS, for trusted localhost or tests.

func WithDialTimeout

func WithDialTimeout(d time.Duration) ClientOption

func WithKeepalive

func WithKeepalive(interval, timeout time.Duration) ClientOption

WithKeepalive sets the gRPC keepalive ping interval and ack timeout.

func WithMaxMessageSize

func WithMaxMessageSize(bytes int) ClientOption

WithMaxMessageSize sets the per-call send/recv size limit in bytes.

func WithTLS

func WithTLS(cfg *tls.Config) ClientOption

type ExecError

type ExecError struct {
	ExitCode int32
	Message  string
}

ExecError carries the remote exit code and optional message from Exec.

func (*ExecError) Error

func (e *ExecError) Error() string

Directories

Path Synopsis
proto
cmd command

Jump to

Keyboard shortcuts

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