Documentation
¶
Overview ¶
Package bundle implements PawnKit server bundles.
Index ¶
- Constants
- func Extract(archive, destination string) error
- func Install(archive, destination, platform string) error
- func Pack(root, destination string) error
- func Rollback(destination string) error
- func WriteManifest(path string, manifest Manifest) error
- type Artifact
- type Config
- type EntryPoints
- type Health
- type InstallPlan
- type Manifest
- type Migration
- type Persistence
- type Server
- type Service
Constants ¶
const ManifestName = "pawn-bundle.json"
ManifestName is the bundle manifest filename.
Variables ¶
This section is empty.
Functions ¶
func WriteManifest ¶
WriteManifest writes a formatted manifest with its checksum.
Types ¶
type Artifact ¶
type Artifact struct {
Name string `json:"name,omitempty"`
Path string `json:"path"`
Checksum string `json:"checksum"`
Platform string `json:"platform"`
}
Artifact is a checksum-verified platform file.
type EntryPoints ¶
type EntryPoints struct {
Gamemode string `json:"gamemode"`
Filterscripts []string `json:"filterscripts,omitempty"`
}
EntryPoints lists the scripts loaded by the server.
type Health ¶
type Health struct {
CheckCommand string `json:"checkCommand,omitempty"`
CheckPort int `json:"checkPort,omitempty"`
Timeout float64 `json:"timeout,omitempty"`
}
Health describes an optional runtime health check.
type InstallPlan ¶
type InstallPlan struct {
Destination string `json:"destination"`
Name string `json:"name"`
Version string `json:"version"`
Replaces bool `json:"replaces"`
}
func PlanInstall ¶
func PlanInstall(archive, destination, platform string) (InstallPlan, error)
PlanInstall verifies an archive and describes its destination.
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schemaVersion"`
Name string `json:"name"`
Version string `json:"version"`
RuntimeProfile string `json:"runtimeProfile"`
Server Server `json:"server"`
EntryPoints EntryPoints `json:"entryPoints"`
Plugins []Artifact `json:"plugins,omitempty"`
Components []Artifact `json:"components,omitempty"`
Configuration *Config `json:"configuration,omitempty"`
Services []Service `json:"services,omitempty"`
Migrations []Migration `json:"migrations,omitempty"`
Persistence *Persistence `json:"persistence,omitempty"`
Health *Health `json:"health,omitempty"`
Checksum string `json:"checksum"`
}
Manifest describes a reproducible server bundle.
func VerifyDirectory ¶
VerifyDirectory checks a bundle directory for the selected platform.
func (Manifest) CanonicalChecksum ¶
CanonicalChecksum returns the checksum with Checksum cleared.
type Migration ¶
type Migration struct {
ID string `json:"id"`
Description string `json:"description"`
AppliesToVersion string `json:"appliesToVersion,omitempty"`
}
Migration describes a persistence migration supplied by an operator.
type Persistence ¶
type Persistence struct {
Paths []string `json:"paths,omitempty"`
}
Persistence lists paths kept outside bundle replacement.