models

package
v0.0.0-...-55fa497 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 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 AddressIP

type AddressIP struct {
	Address string `json:"ip"`   // IP address in dotted-quad notation
	Port    string `json:"port"` // Port number as a string
}

AddressIP represents an IP address and associated port.

type ServerConfig

type ServerConfig struct {
	Address        string `json:"address"`        // Address to bind to (e.g., "localhost")
	Port           int    `json:"port"`           // Port to bind to (default is 8000)
	MetricsPort    int    `json:"metricsPort"`    // Port to bind to for metrics (default is 8001)
	ConfigDirname  string `json:"configDirname"`  // Directory name for configuration files
	AutoStart      bool   `json:"autoStart"`      // Flag to automatically start the simulation when the server starts
	Verbose        bool   `json:"verbose"`        // Flag to enable verbose logging
	MaxCodecVMs    int    `json:"maxCodecVMs"`    // VM pool size for JS codec execution (0 = default 100)
	CodecTimeoutMs int    `json:"codecTimeoutMs"` // Per-execution timeout in milliseconds (0 = default 100, negative = no timeout)
}

ServerConfig holds the configuration for the server including address, ports, and other settings.

func GetConfigFile

func GetConfigFile(path string) (*ServerConfig, error)

GetConfigFile loads the configuration from the specified file path, parses it as JSON, and returns a ServerConfig instance. It returns an error if the file cannot be read or parsed.

Jump to

Keyboard shortcuts

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