mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 04:52:26 +00:00
9919f77c909fe29e18b36ae7653bb5f863637658
- Changed UUIDLength type from byte to int in core/config/consts.go - Introduced MetaDir constant in core/config/consts.go - Added corestate package with initial state management and UUID handling - Implemented GetNodeUUID and SetNodeUUID functions for UUID file management - Created RunManager and RunFileManager for runtime directory management - Updated GeneralServer to use new configuration structure - Removed deprecated init package and replaced with main entry point - Added color utility functions for logging - Enhanced UUID generation functions in utils package - Updated update logic to handle new configuration structure - Added routines for cleaning temporary runtime directories - Introduced response formatting for API responses
Go Sally MVP (Minimum/Minimal Viable Product)
What is this?
System that allows you to build your own infrastructure based on identical nodes and various scripts written using built-in Lua 5.1, shebang scripts (scripts that start with the #! symbols), compiled binaries.
Features
Go Sally is not viable at the moment, but it already has the ability to run embedded scripts, log slog events to stdout, handle RPC like requests, and independent automatic update from the repository (my pride, to be honest).
Example of use
The basic directory tree looks something like this
.
├── bin
│ └── node Node core binary file
├── com
│ ├── echo.lua
│ ├── _globals.lua Declaring global variables and functions for all internal scripts (also required for luarc to work correctly)
│ └── _prepare.lua Script that is executed before each script launch
├── config.yaml
└── Makefile
3 directories, 6 files
Launch by command
$ make run
or for structured logs
$ make run
Example of GET request to server
curl -s http://localhost:8080/api/v1/com/echo?msg=Hello
Then the response from the server
{
"answer": "Hello",
"status": "ok"
}
How to install
You don't need it now, but you can figure it out with the Makefile
Description
Languages
Go
86.3%
Lua
11.7%
Makefile
2%