config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityConfig

type EntityConfig struct {
	Nodes []NodeConfig `json:"nodes" yaml:"nodes"`
	Link  LinkConfig   `json:"link" yaml:"link"`
}

EntityConfig contains the minimal parameters required to build the Core/Entity layer. Higher level packages are expected to extend this struct.

func (EntityConfig) Validate

func (c EntityConfig) Validate() error

Validate enforces basic invariants required by the Core/Entity skeleton.

type LinkConfig

type LinkConfig struct {
	BaseDelay  time.Duration `json:"base_delay" yaml:"base_delay"`
	Multiplier uint64        `json:"multiplier" yaml:"multiplier"`
}

LinkConfig exposes the knobs that impact link delay.

func (LinkConfig) EffectiveDelay

func (c LinkConfig) EffectiveDelay() time.Duration

EffectiveDelay returns the computed delay for the provided cycle based on the configured multiplier. This helper is primarily used in tests or when the caller does not need a dedicated link strategy.

type NodeConfig

type NodeConfig struct {
	ID int `json:"id" yaml:"id"`
}

NodeConfig describes a single node in the topology.

Jump to

Keyboard shortcuts

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