launch

package
v15.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 34 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCandidateDisappeared = goerrors.New("candidate disappeared from disk!")

Functions

func Register

func Register(router *butlerd.Router)

func RegisterLauncher

func RegisterLauncher(strategy LaunchStrategy, launcher Launcher)

Types

type LaunchStrategy

type LaunchStrategy string
const (
	LaunchStrategyUnknown LaunchStrategy = ""
	LaunchStrategyNative  LaunchStrategy = "native"
	LaunchStrategyHTML    LaunchStrategy = "html"
	LaunchStrategyURL     LaunchStrategy = "url"
	LaunchStrategyShell   LaunchStrategy = "shell"
)

type Launcher

type Launcher interface {
	Do(params LauncherParams) error
}

type LauncherParams

type LauncherParams struct {
	RequestContext *butlerd.RequestContext
	Ctx            context.Context

	// If relative, it's relative to the WorkingDirectory
	FullTargetPath string

	// May be nil
	PeInfo *pelican.PeInfo

	// May be nil
	Candidate *dash.Candidate

	// May be nil
	AppManifest *butlerd.Manifest

	// May be nil
	Action *butlerd.Action

	// If true, enable sandbox
	Sandbox bool

	// Additional command-line arguments
	Args []string

	// Additional environment variables
	Env map[string]string

	PrereqsDir    string
	ForcePrereqs  bool
	Access        *operate.GameAccess
	InstallFolder string
	Runtime       *ox.Runtime

	SessionStarted func()
	// contains filtered or unexported fields
}

func (*LauncherParams) GetInstallContainer

func (lp *LauncherParams) GetInstallContainer() (*tlc.Container, error)

func (*LauncherParams) SniffFile

func (lp *LauncherParams) SniffFile(fileEntry *tlc.File) (*dash.Candidate, error)

type StrategyResult

type StrategyResult struct {
	Strategy       LaunchStrategy
	FullTargetPath string
	Candidate      *dash.Candidate
}

func DetermineCandidateStrategy

func DetermineCandidateStrategy(basePath string, candidate *dash.Candidate) (*StrategyResult, error)

func DetermineStrategy

func DetermineStrategy(consumer *state.Consumer, runtime *ox.Runtime, installFolder string, manifestAction *butlerd.Action) (*StrategyResult, error)

func (*StrategyResult) String

func (sr *StrategyResult) String() string

Directories

Path Synopsis
launchers
url

Jump to

Keyboard shortcuts

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