Documentation
¶
Overview ¶
Package provision turns a blueprint plus a service's choices into the ServiceSpec the agent runs, following Pterodactyl's conventions so official eggs and yolks images work unchanged (environment names, STARTUP, /home/container, /mnt/server).
Index ¶
Constants ¶
const DefaultPIDs = 512
DefaultPIDs limits processes per container (Wings uses 512 by default).
Variables ¶
This section is empty.
Functions ¶
func ParsePorts ¶
ParsePorts parses "25565", "25565,25570" and ranges like "27015-27020" (at most 1000 ports).
Types ¶
type Choices ¶
type Choices struct {
Image string // must be one of the egg's images; "" = first
Startup string // name of an egg startup command; "" = first
Variables map[string]string // env -> value; missing ones use the egg default
}
Choices are what the admin picks when creating a service.
type FieldError ¶
FieldError is a validation problem with one input.
func Resolve ¶
func Resolve(e *egg.Egg, c Choices) (image, startup string, vars map[string]string, errs []FieldError)
Resolve validates choices against the egg and returns the image, startup command and the complete variable map to store. Admins may set every variable; customer-facing restrictions (user_editable) apply once customers create services themselves.