runc

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package runc implements container runtime based on OpenContainers libcontainer package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithRuntimeBinPath

func WithRuntimeBinPath(p string) Option

func WithWorkDir

func WithWorkDir(p string) Option

type Runtime

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

Runtime is the runc-based edge function runtime. It implements both edgefunc.Runtime for backward compatibility and provides additional methods for the new controller-based approach.

func NewRuntime

func NewRuntime(ctx context.Context, opts ...Option) (*Runtime, error)

NewRuntime returns a new edgefunc.Runtime implementation based on runc.

func (*Runtime) DeleteExec

func (r *Runtime) DeleteExec(ctx context.Context, id string) error

DeleteExec implements edgefunc.Runtime.DeleteExec.

func (*Runtime) Exec

func (r *Runtime) Exec(ctx context.Context, id string, esZipPath string, port int) error

Exec implements edgefunc.Runtime.Exec. This creates a single-function container with one eszip file.

func (*Runtime) ExecNamespace

func (r *Runtime) ExecNamespace(ctx context.Context, id string, eszipDir string, servicePort, controlPort int) error

ExecNamespace creates a namespace-based container that can host multiple functions. The container runs edge-runtime in server mode without --main-service, exposing both a service port (for requests) and a control port (for the /_internal/* API). Functions are loaded dynamically via the control API.

func (*Runtime) ExecStatus

func (r *Runtime) ExecStatus(ctx context.Context, id string) (edgefunc.Status, error)

ExecStatus implements edgefunc.Runtime.ExecStatus.

func (*Runtime) ListExecs

func (r *Runtime) ListExecs(ctx context.Context) ([]edgefunc.Status, error)

ListExecs implements edgefunc.Runtime.ListExecs.

func (*Runtime) Network

func (r *Runtime) Network() *network.Network

Network returns the network manager for this runtime. This is used by the EdgeController to get container IP addresses.

func (*Runtime) Resolver

func (r *Runtime) Resolver(next plugin.Handler) plugin.Handler

Resolver implements edgefunc.Runtime.Resolver.

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context) error

Run initializes and runs the runtime bookkeeping loop. It will block until the context is cancelled.

func (*Runtime) StopExec

func (r *Runtime) StopExec(ctx context.Context, id string) error

StopExec implements edgefunc.Runtime.StopExec.

Directories

Path Synopsis
iptables
Package iptables container useful routines for manipulating iptables rules.
Package iptables container useful routines for manipulating iptables rules.

Jump to

Keyboard shortcuts

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