Documentation
¶
Overview ¶
Package noop is an in-memory Runtime used by unit tests of higher layers (sandbox manager, control plane). It does not actually start anything — it just tracks sandbox IDs and serves back the handles it was given.
Index ¶
- type Runtime
- func (r *Runtime) AgentEndpoint(sandboxID string) (host string, port int, err error)
- func (r *Runtime) BuildImage(ctx context.Context, req runtime.BuildRequest) error
- func (r *Runtime) CPUCount(sandboxID string) int
- func (r *Runtime) Commit(ctx context.Context, sandboxID, imageTag string) error
- func (r *Runtime) Create(ctx context.Context, req runtime.CreateRequest) (*runtime.SandboxHandle, error)
- func (r *Runtime) Destroy(ctx context.Context, sandboxID string) error
- func (r *Runtime) HasImage(tag string) bool
- func (r *Runtime) Image(sandboxID string) string
- func (r *Runtime) IsPaused(sandboxID string) bool
- func (r *Runtime) IsStopped(sandboxID string) bool
- func (r *Runtime) ListManaged(ctx context.Context) ([]runtime.ManagedContainer, error)
- func (r *Runtime) MemoryMB(sandboxID string) int
- func (r *Runtime) Name() string
- func (r *Runtime) Pause(ctx context.Context, sandboxID string) error
- func (r *Runtime) ReadyCmd(sandboxID string) string
- func (r *Runtime) Start(ctx context.Context, sandboxID string) error
- func (r *Runtime) StartCmd(sandboxID string) string
- func (r *Runtime) Stats(ctx context.Context, sandboxID string) (*runtime.Stats, error)
- func (r *Runtime) Stop(ctx context.Context, sandboxID string) error
- func (r *Runtime) Unpause(ctx context.Context, sandboxID string) error
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
}
func (*Runtime) AgentEndpoint ¶
func (*Runtime) BuildImage ¶
func (*Runtime) CPUCount ¶
CPUCount / MemoryMB return the requested cgroup caps so tests can assert the resource-limit plumbing reached the runtime. Zero for unknown sandboxes — same convention as Image().
func (*Runtime) Create ¶
func (r *Runtime) Create(ctx context.Context, req runtime.CreateRequest) (*runtime.SandboxHandle, error)
func (*Runtime) HasImage ¶
HasImage reports whether an image tag has been registered via BuildImage or Commit. Exposed for tests that want to assert build plumbing.
func (*Runtime) Image ¶
Image returns the image tag the named sandbox was launched with, or "" if the sandbox is unknown. Exposed for tests.
func (*Runtime) ListManaged ¶ added in v0.2.0
ListManaged returns every tracked sandbox as a ManagedContainer. Unit tests use this path to exercise Rehydrate logic without a real Docker daemon — seed entries with Create first, optionally transition them via Pause/Stop.
func (*Runtime) StartCmd ¶
StartCmd / ReadyCmd return the per-sandbox template commands that were forwarded through CreateRequest. Exposed for tests that exercise the template resolver path.