edgefunc

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime interface {
	// Start request the runtime to start the execution of the function.
	// Cancelling the context will stop the runtime bookkeeping and all
	// of its children processes.
	Start(ctx context.Context, id string, esZipPath string) error

	// Stop request the runtime to stop 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.
	Stop(ctx context.Context, id string) error

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

	// List returns a list of all functions running in the runtime.
	List(ctx context.Context) ([]Status, error)
}

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.

Jump to

Keyboard shortcuts

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