ggp

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Overview

Package ggp contains code for binding to and controlling Stadia gamelets. https://stadia.dev

Index

Constants

This section is empty.

Variables

GGP is the path to the ggp executable.

Functions

func Devices

func Devices(ctx context.Context) ([]bind.Device, error)

Devices returns the list of attached GGP devices.

func GGPExecutablePath

func GGPExecutablePath() (file.Path, error)

GGPExecutablePath returns the path to the ggp executable

func Monitor

func Monitor(ctx context.Context, r *bind.Registry, interval time.Duration) error

Monitor updates the registry with devices that are added and removed at the specified interval. Monitor returns once the context is cancelled.

Types

type Binding

type Binding struct {
	remotessh.Device
	Gamelet string
}

Binding represents an attached ggp ssh client

func (Binding) DefaultReplayCacheDir

func (b Binding) DefaultReplayCacheDir() string

DefaultReplayCacheDir returns the default replay resource cache directory on a GGP device

func (Binding) ListExecutables

func (b Binding) ListExecutables(ctx context.Context, inPath string) ([]string, error)

ListExecutables lists all executables. On GGP, executables may not have the executable bit set, so treat any file as executable

type GGPConfiguration

type GGPConfiguration struct {
	remotessh.Configuration
	Gamelet string
}

type ParsedList

type ParsedList struct {
	Header []string
	Rows   [][]string
}

ParseList contains the output from ggp xxx list command

func ParseListOutput

func ParseListOutput(stdout *bytes.Buffer) (*ParsedList, error)

ParseListOutput parses the output from ggp xxx list command. For example: blablabla header1 header2 header3 ======= ======= ======= value1 value2 value3

func (ParsedList) ColumnByName

func (t ParsedList) ColumnByName(name string) ([]string, error)

ColumnByName returns the content of the table for the specified column in a list of string.

Jump to

Keyboard shortcuts

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