memory

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package memory provides in-memory implementations of the storage interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigStore

func NewConfigStore() storage.ConfigStore

NewConfigStore returns an in-memory ConfigStore.

func NewConnectionRegistry

func NewConnectionRegistry() storage.ConnectionRegistry

NewConnectionRegistry returns an in-memory registry. Global lookups are no-ops (single-instance); replace with a Redis adapter for multi-instance routing.

func NewRouter

func NewRouter() storage.MessageRouter

NewRouter returns a single-instance no-op router. CallRemote always returns storage.ErrRouterNotImplemented; ServeRemote blocks until ctx is cancelled.

func NewTransactionStore

func NewTransactionStore() storage.TransactionStore

NewTransactionStore returns an in-memory TransactionStore.

Types

type InProcessHub

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

InProcessHub is a test/dev fixture simulating multi-instance routing in one process — it validates the MessageRouter contract before real broker adapters.

func NewInProcessHub

func NewInProcessHub() *InProcessHub

NewInProcessHub creates a hub.

func (*InProcessHub) Bind

func (h *InProcessHub) Bind(cpID, instanceID string)

Bind records which instance holds a charge point.

func (*InProcessHub) Router

func (h *InProcessHub) Router(instanceID string) storage.MessageRouter

Router returns a MessageRouter for the given instance.

Jump to

Keyboard shortcuts

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