host

package
v0.0.0-...-0b4b9e0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 11 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHost

type CommandHost struct {
	// contains filtered or unexported fields
}

CommandHost is a host for other commands

func New

func New() *CommandHost

New returns an initialized command host instance

func (*CommandHost) ConnectToNewDockerContainer

func (h *CommandHost) ConnectToNewDockerContainer() (remote *godet.RemoteDebugger, err error)

ConnectToNewDockerContainer connects to a new docker container and returns a connected instance of *godet.RemoteDebugger

func (*CommandHost) ConnectToRemote

func (h *CommandHost) ConnectToRemote() (remote *godet.RemoteDebugger, err error)

ConnectToRemote implements Host.ConnectToRemote

func (*CommandHost) DisconnectAndRemoveDockerContainer

func (h *CommandHost) DisconnectAndRemoveDockerContainer() (err error)

DisconnectAndRemoveDockerContainer dicsonnects from a headless Chrome instance, and then stops and removes the temporary Docker container

func (*CommandHost) DisconnectFromRemote

func (h *CommandHost) DisconnectFromRemote() (err error)

DisconnectFromRemote implements Host.Disconnect

func (*CommandHost) GetDeadline

func (h *CommandHost) GetDeadline() time.Duration

GetDeadline implements Host.GetDeadline

func (*CommandHost) GetHandler

func (h *CommandHost) GetHandler(cmdName string) lib.Command

GetHandler return a command handler by the provided command name

func (*CommandHost) GetShowHelp

func (h *CommandHost) GetShowHelp() bool

GetShowHelp implements Host.GetShowHelp

func (*CommandHost) GetVerbose

func (h *CommandHost) GetVerbose() bool

GetVerbose implements Host.GetVerbose

func (*CommandHost) Init

func (h *CommandHost) Init(cmdName string)

Init specifies common command-line flags to parse

func (*CommandHost) ListCommands

func (h *CommandHost) ListCommands()

ListCommands renders a formatted list of registered commands

func (*CommandHost) RequestInterrupt

func (h *CommandHost) RequestInterrupt()

RequestInterrupt implements Host.RequestInterrupt

func (*CommandHost) SetHandler

func (h *CommandHost) SetHandler(cmdName string, handler lib.Command)

SetHandler registers a new command name and its handler

Jump to

Keyboard shortcuts

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