mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 17:52:24 +00:00
- 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
23 lines
447 B
Go
23 lines
447 B
Go
package corestate
|
|
|
|
type Stage string
|
|
|
|
const (
|
|
StageNotReady Stage = "init"
|
|
StagePreInit Stage = "pre-init"
|
|
StagePostInit Stage = "post-init"
|
|
StageReady Stage = "event"
|
|
)
|
|
|
|
const (
|
|
StringsNone string = "none"
|
|
)
|
|
|
|
func NewCorestate(o *CoreState) *CoreState {
|
|
// TODO: create a convenient interface for creating a state
|
|
// if !utils.IsFullyInitialized(o) {
|
|
// return nil, fmt.Errorf("CoreState is not fully initialized")
|
|
// }
|
|
return o
|
|
}
|