microvm

package
v1.14.0-rc Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package microvm provides deterministic test doubles for AppTheory MicroVM controllers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Command   runtimemicrovm.Command
	RequestID string
	TenantID  string
	Namespace string
	SessionID string
}

Call records one fake client operation.

type FakeClient

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

FakeClient is an in-memory constrained MicroVM client for tests.

func NewFakeClient

func NewFakeClient() *FakeClient

NewFakeClient creates a fake client with a deterministic starting clock.

func NewFakeClientWithTime

func NewFakeClientWithTime(now time.Time) *FakeClient

NewFakeClientWithTime creates a fake client with the provided current time.

func (*FakeClient) Calls

func (c *FakeClient) Calls() []Call

Calls returns a copy of recorded calls.

func (*FakeClient) Create

Create creates a fake session record.

func (*FakeClient) Session

Session returns a fake session record.

func (*FakeClient) SetNow

func (c *FakeClient) SetNow(now time.Time)

SetNow sets the fake client's current time.

func (*FakeClient) Start

Start marks a fake session as starting toward started.

func (*FakeClient) Status

Status returns fake session status.

func (*FakeClient) Stop

Stop marks a fake session as stopping toward stopped.

Jump to

Keyboard shortcuts

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