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 ¶
- type ConfigManifest
- func (c ConfigManifest) FromProto(p *pbcomponent.ConfigManifest) ConfigManifest
- func (c ConfigManifest) MarshalWire() []byte
- func (ConfigManifest) Name() string
- func (c ConfigManifest) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c ConfigManifest) ToProto() *pbcomponent.ConfigManifest
- func (c ConfigManifest) UnmarshalWire(data []byte) (any, error)
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 (c ConfigManifest) FromProto(p *pbcomponent.ConfigManifest) ConfigManifest
func (ConfigManifest) MarshalWire ¶ added in v0.15.0
func (c ConfigManifest) MarshalWire() []byte
func (ConfigManifest) Name ¶
func (ConfigManifest) Name() string
Name implements cardinal.Component.
func (ConfigManifest) ProtoDescriptor ¶ added in v0.16.4
func (c ConfigManifest) ProtoDescriptor() protoreflect.MessageDescriptor
func (ConfigManifest) ToProto ¶ added in v0.15.0
func (c ConfigManifest) ToProto() *pbcomponent.ConfigManifest
func (ConfigManifest) UnmarshalWire ¶ added in v0.15.0
func (c ConfigManifest) UnmarshalWire(data []byte) (any, error)