steps

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package steps runs a definition's built-in install steps and writes its config files. Every path is resolved inside the server directory.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInstalled = errors.New("server files are missing; run `anyserve update` to reinstall them")

ErrNotInstalled means the server files aren't there.

Functions

func Apply

func Apply(d *spec.Definition, dir, goos string, opts Options) error

Apply runs the steps that apply to goos, in order.

func Resolve

func Resolve(dir, rel string) (string, error)

Resolve turns a definition's relative path into a host path inside dir, refusing anything that would escape it (including through symlinks).

func RunExec

func RunExec(ctx context.Context, d *spec.Definition, dir, goos string, tctx spec.Context, out io.Writer) error

RunExec runs the definition's exec steps that apply to goos: each runs the server's own command once, from the server folder with HOME set to it, unless its creates path already exists.

func WriteFiles

func WriteFiles(d *spec.Definition, dir string, ctx spec.Context) (written, pending []string, err error)

WriteFiles writes the definition's config files. Templated files without overwrite are only written when missing, so hand edits survive. Files with set have just those values changed every time; if such a file doesn't exist yet (many games create theirs on first start) and has no template, it is listed in pending and tried again on the next start.

Types

type Options

type Options struct {
	// SteamCMDDir is where Anyserve's SteamCMD lives, for steam_sdk.
	SteamCMDDir string
}

Options carries host details some steps need.

Jump to

Keyboard shortcuts

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