component

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package component holds the Cardinal components the data plugin owns.

The plugin keeps loaded configuration in an in-memory catalog (not in components), so this package is small: just the ConfigManifest singleton that records, per file, the content hash of the config the world is running. The reconcile system in pkg/plugin/data/system uses it to keep the catalog matched to whatever a snapshot restore brings back.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigManifest

type ConfigManifest struct {
	// Files maps each kind's JSONFile() path to the content hash the source reported when those
	// bytes were last loaded into the catalog.
	Files map[string]string
}

ConfigManifest is the only snapshot-resident component the data plugin owns. It records, per config file, the content hash of the bytes loaded into the plugin's in-memory catalog.

On a snapshot restore the reconcile system reads this back and uses it to re-fetch the exact config the world was running before the restart, so a crash never silently changes the rules of an in-flight game. The hashes themselves come from the source — a forge column in production, sha256 of the embedded bytes in local dev.

func (ConfigManifest) FromProto added in v0.15.0

func (ConfigManifest) MarshalWire added in v0.15.0

func (c ConfigManifest) MarshalWire() ([]byte, error)

func (ConfigManifest) Name

func (ConfigManifest) Name() string

Name implements cardinal.Component.

func (ConfigManifest) ToProto added in v0.15.0

func (ConfigManifest) UnmarshalWire added in v0.15.0

func (c ConfigManifest) UnmarshalWire(data []byte) (any, error)

Jump to

Keyboard shortcuts

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