cluster

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cluster composes a machine's local runtime with remote runtimes for its peers (spec 022). It implements core/runtime.Runtime by dispatching each RunSpec to the transport for spec.Machine: the local name (or empty) runs on the local runtime; any other name runs on that machine's remote runtime.

The machine is chosen upstream by deterministic placement (core/machines); cluster only carries the run to the resolved transport, so core/engine stays unaware of local-vs-remote.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

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

Runtime is the per-machine composite runtime.

func New

func New(localName string, localRT runtime.Runtime, remotes map[string]runtime.Runtime) *Runtime

New builds a cluster runtime: localName identifies this machine, localRT runs its work, and remotes maps peer machine names to their runtimes.

func (*Runtime) Add added in v0.6.0

func (r *Runtime) Add(name string, rt runtime.Runtime)

Add installs (or replaces) the transport for a peer machine. Used by mesh enrollment (spec 024) to apply a join without restarting the daemon.

func (*Runtime) Dispatch

func (r *Runtime) Dispatch(ctx context.Context, spec runtime.RunSpec) (runtime.Run, error)

Dispatch routes spec to the transport for spec.Machine.

func (*Runtime) Name

func (r *Runtime) Name() string

Name implements runtime.Runtime.

func (*Runtime) Remove added in v0.6.0

func (r *Runtime) Remove(name string)

Remove drops the transport for a peer machine.

Jump to

Keyboard shortcuts

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