Discover Packages
github.com/lsongdev/ohmyserver
modules
xray
engine
package
Version:
v0.0.0-...-b380bb8
Opens a new window with list of versions in this module.
Published: Nov 18, 2026
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package engine manages one embedded Xray instance and its saved configuration.
View Source
var (
ErrConflict = errors .New ("Xray configuration changed; reload before saving or applying")
ErrInvalid = errors .New ("invalid Xray configuration")
ErrClosed = errors .New ("Xray module is closed")
)
Apply starts the draft, replacing the running core if necessary. On failure,
the previous applied configuration stays on disk and the old core is restored.
type Snapshot struct {
Config json .RawMessage `json:"config"`
Revision uint64 `json:"revision"`
Enabled bool `json:"enabled"`
Running bool `json:"running"`
Pending bool `json:"pending"`
Error string `json:"error,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.