serverbase

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AppcastURL = "https://updates.outrig.run/appcast.xml"
View Source
const DevWebServerPort = 6005

Development port for server

View Source
const OutrigDataDir = "data"
View Source
const OutrigDevEnvName = "OUTRIG_DEV"
View Source
const OutrigIdFile = "outrig.id"
View Source
const OutrigLockFile = "outrig.lock"
View Source
const OutrigTEventsFile = "tevents.jsonl"
View Source
const ProdWebServerPort = 5005

Default production port for server

Variables

View Source
var OutrigBuildTime = ""

OutrigBuildTime is the build timestamp of Outrig This gets set from main-server.go during initialization

View Source
var OutrigCommit = ""

OutrigCommit is the git commit hash of this build This gets set from main-server.go during initialization

View Source
var OutrigFirstRun bool

OutrigFirstRun indicates if this is the first run of this Outrig server instance

View Source
var OutrigId string

OutrigId is the unique identifier for this Outrig server instance

View Source
var OutrigServerVersion = "v0.7.4"

OutrigServerVersion is the current version of Outrig This gets set from main-server.go during initialization

Functions

func EnsureDataDir

func EnsureDataDir() error

func EnsureHomeDir

func EnsureHomeDir() error

func EnsureOutrigId

func EnsureOutrigId(shouldCreate bool) (string, bool, error)

EnsureOutrigId ensures that the outrig.id file exists and contains a valid UUID. If the file doesn't exist and shouldCreate is true, it creates it with a new UUID. If the file exists but contains an invalid UUID and shouldCreate is true, it overwrites it with a new UUID. If shouldCreate is false and no valid UUID exists, it returns "", false, nil. Returns: - The UUID (either read from the file or newly generated) - A boolean indicating if a new UUID was generated (true) or read from an existing file (false) - An error if one occurred during the process

func GetDomainSocketName

func GetDomainSocketName() string

GetDomainSocketName returns the full domain socket path

func GetOutrigDataDir

func GetOutrigDataDir() string

GetOutrigDataDir returns the path to the data directory

func GetOutrigHome

func GetOutrigHome() string

GetOutrigHome returns the appropriate home directory based on mode

func GetTEventsFilePath

func GetTEventsFilePath() string

GetTEventsFilePath returns the full path to the tevents.jsonl file

func GetWebServerPort

func GetWebServerPort() int

GetWebServerPort returns the appropriate web server port based on mode

func IsDev

func IsDev() bool

IsDev returns true if the server is running in development mode

Types

type FDLock

type FDLock interface {
	Close() error
}

func AcquireOutrigServerLock

func AcquireOutrigServerLock() (FDLock, error)

Jump to

Keyboard shortcuts

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