edgefunc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainSuffix = "apoxy.local"
)

Variables

View Source
var (
	ErrAlreadyExists = errors.New("function already exists")
	ErrNotFound      = errors.New("function not found")
)

Functions

This section is empty.

Types

type Runtime

type Runtime interface {
	// Exec creates a new function execution.
	Exec(ctx context.Context, id string, esZipPath string, port int) error

	// StopExec stops the execution of the function.
	// The process may take some time to stop, so this method will return
	// immediately after sending the stop signal.
	// No-op if the runtime is already stopped.
	StopExec(ctx context.Context, id string) error

	// DeleteExec deletes the function execution.
	DeleteExec(ctx context.Context, id string) error

	// ExecStatus returns the current status of the runtime.
	ExecStatus(ctx context.Context, id string) (Status, error)

	// ListExecs returns a list of all function executions.
	ListExecs(ctx context.Context) ([]Status, error)

	// Resolver implements the dns.Plugin interface - returns a dns.Handler
	// to resolve edge function names. Must call next to continue the DNS
	// resolution.
	Resolver(next plugin.Handler) plugin.Handler
}

type State

type State string
const (
	StateCreated State = "Created"
	StateRunning State = "Running"
	StatePaused  State = "Paused"
	StateStopped State = "Stopped"
	StateUnknown State = "Unknown"
)

type Status

type Status struct {
	ID        string    `json:"id"`
	State     State     `json:"state"`
	CreatedAt time.Time `json:"createdAt"`
}

Directories

Path Synopsis
Package runc implements container runtime based on OpenContainers libcontainer package.
Package runc implements container runtime based on OpenContainers libcontainer package.
network/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