memory

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package memory provides in-process resource adapters for tests and local-first demos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

Base is a simple Resource implementation.

func Feature

func Feature(env, service, name string) *Base

Feature is a KindFeature stub.

func New

New constructs a Base resource. Capabilities default to SupportsHealth only.

func RateLimit

func RateLimit(env, service, name string) *Base

RateLimit is a KindRateLimit stub.

func Worker

func Worker(env, service, name string) *Base

Worker is a KindWorker stub.

func (*Base) AdvanceEpoch

func (b *Base) AdvanceEpoch(reason string) (resource.EpochAdvance, error)

AdvanceEpoch advances local epoch with reason.

func (*Base) Capabilities

func (b *Base) Capabilities() resource.ResourceCapabilities

func (*Base) Describe

func (b *Base) Describe() resource.Description

func (*Base) Epoch

func (b *Base) Epoch() resource.ResourceEpoch

Epoch returns the in-memory epoch.

func (*Base) Health

func (b *Base) Health(ctx context.Context) resource.ResourceHealth

func (*Base) ID

func (b *Base) ID() resource.ResourceID

func (*Base) Kind

func (b *Base) Kind() resource.Kind

func (*Base) Mutate

func (b *Base) Mutate(ctx context.Context, op string, attrs map[string]string) (resource.Evidence, error)

Mutate implements MutableResource when SupportsOwnership or fencing is claimed; otherwise returns ErrCapabilityClaimed.

func (*Base) SetHealth

func (b *Base) SetHealth(h resource.ResourceHealth)

SetHealth overrides health for tests.

Jump to

Keyboard shortcuts

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