runner

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaulWorkers = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	RunnerConfig

	Log *slog.Logger
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(log *slog.Logger, reg *asm.Registry, cfg RunnerConfig) (*Runner, error)

func (*Runner) Close

func (r *Runner) Close() error

func (*Runner) ContainerdContainerForSandbox

func (r *Runner) ContainerdContainerForSandbox(ctx context.Context, id entity.Id) (containerd.Container, error)

func (*Runner) ContainerdNamespace

func (r *Runner) ContainerdNamespace() string

func (*Runner) Drain

func (r *Runner) Drain(ctx context.Context) error

Drain sets the runner's node status to disabled and stops all running sandboxes

func (*Runner) SetupControllers

func (r *Runner) SetupControllers(
	ctx context.Context,
	eas *es.EntityAccessClient,
	rs *rpc.Server,
) (
	*controller.ControllerManager,
	error,
)

func (*Runner) Start

func (r *Runner) Start(ctx context.Context) error

type RunnerConfig

type RunnerConfig struct {
	Id            string `json:"id" cbor:"id" yaml:"id"`
	ListenAddress string `json:"listen_address" cbor:"listen_address" yaml:"listen_address"`
	Workers       int    `json:"workers" cbor:"workers" yaml:"workers"`
	DataPath      string `json:"data_path" cbor:"data_path" yaml:"data_path" asm:"data-path"`

	// Optional RPC configuration for advanced setups
	// If not provided, a default insecure connection will be used
	// to connect to the server address.
	Config *clientconfig.Config `json:"config" cbor:"config" yaml:"config"`

	// Optional cloud authentication configuration for disk replication
	CloudAuth *coordinate.CloudAuthConfig `json:"cloud_auth,omitempty" cbor:"cloud_auth,omitempty" yaml:"cloud_auth,omitempty"`
}

Jump to

Keyboard shortcuts

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