snapshot

package
v1.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(registry *routing.Registry) ([]byte, error)

Export serialises the state of all Snapshotable services in the registry into a single JSON document.

func Import

func Import(registry *routing.Registry, data []byte) error

Import restores service state from a JSON document previously produced by Export. Services present in the file but not registered in the registry are silently skipped.

Types

type StateFile

type StateFile struct {
	Version    int                        `json:"version"`
	ExportedAt string                     `json:"exported_at"`
	Services   map[string]json.RawMessage `json:"services"`
}

StateFile is the top-level structure of a cloudmock state snapshot.

Jump to

Keyboard shortcuts

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