runner

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: GPL-3.0, GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteInitHookForRunner

func ExecuteInitHookForRunner(language string) error

Types

type GrpcRunner added in v0.9.8

type GrpcRunner struct {
	Client  gm.LspServiceClient
	Timeout time.Duration
	// contains filtered or unexported fields
}

GrpcRunner handles grpc messages.

func ConnectToGrpcRunner added in v0.9.8

func ConnectToGrpcRunner(manifest *manifest.Manifest, outFile io.Writer, timeout time.Duration) (*GrpcRunner, error)

ConnectToGrpcRunner makes a connection with grpc server

func (*GrpcRunner) Alive added in v1.0.4

func (r *GrpcRunner) Alive() bool

func (*GrpcRunner) Connection added in v0.9.8

func (r *GrpcRunner) Connection() net.Conn

func (*GrpcRunner) ExecuteAndGetStatus added in v0.9.8

func (r *GrpcRunner) ExecuteAndGetStatus(m *gm.Message) *gm.ProtoExecutionResult

func (*GrpcRunner) ExecuteMessageWithTimeout added in v0.9.8

func (r *GrpcRunner) ExecuteMessageWithTimeout(message *gm.Message) (*gm.Message, error)

ExecuteMessageWithTimeout process reuqest and give back the response

func (*GrpcRunner) IsMultithreaded added in v0.9.8

func (r *GrpcRunner) IsMultithreaded() bool

func (*GrpcRunner) Kill added in v0.9.8

func (r *GrpcRunner) Kill() error

Kill closes the grpc connection and kills the process

func (*GrpcRunner) Pid added in v0.9.8

func (r *GrpcRunner) Pid() int

type LanguageRunner added in v0.5.0

type LanguageRunner struct {
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

func StartRunner added in v0.8.1

func StartRunner(manifest *manifest.Manifest, port string, outputStreamWriter io.Writer, killChannel chan bool, debug bool) (*LanguageRunner, error)

Looks for a runner configuration inside the runner directory finds the runner configuration matching to the manifest and executes the commands for the current OS

func (*LanguageRunner) Alive added in v1.0.4

func (r *LanguageRunner) Alive() bool

func (*LanguageRunner) Connection added in v0.5.0

func (r *LanguageRunner) Connection() net.Conn

func (*LanguageRunner) EnsureConnected added in v1.0.4

func (r *LanguageRunner) EnsureConnected() bool

func (*LanguageRunner) ExecuteAndGetStatus added in v0.5.0

func (r *LanguageRunner) ExecuteAndGetStatus(message *gauge_messages.Message) *gauge_messages.ProtoExecutionResult

ExecuteAndGetStatus invokes the runner with a request and waits for response. error is thrown only when unable to connect to runner

func (*LanguageRunner) ExecuteMessageWithTimeout added in v0.9.8

func (r *LanguageRunner) ExecuteMessageWithTimeout(message *gauge_messages.Message) (*gauge_messages.Message, error)

func (*LanguageRunner) IsMultithreaded added in v0.8.1

func (r *LanguageRunner) IsMultithreaded() bool

func (*LanguageRunner) Kill added in v0.5.0

func (r *LanguageRunner) Kill() error

func (*LanguageRunner) Pid added in v0.7.0

func (r *LanguageRunner) Pid() int

type MultithreadedRunner added in v0.8.1

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

func (*MultithreadedRunner) Alive added in v1.0.4

func (r *MultithreadedRunner) Alive() bool

func (*MultithreadedRunner) Connection added in v0.8.1

func (r *MultithreadedRunner) Connection() net.Conn

func (*MultithreadedRunner) ExecuteAndGetStatus added in v0.8.1

func (*MultithreadedRunner) ExecuteMessageWithTimeout added in v0.9.8

func (r *MultithreadedRunner) ExecuteMessageWithTimeout(message *gauge_messages.Message) (*gauge_messages.Message, error)

func (*MultithreadedRunner) IsMultithreaded added in v0.8.1

func (r *MultithreadedRunner) IsMultithreaded() bool

func (*MultithreadedRunner) Kill added in v0.8.1

func (r *MultithreadedRunner) Kill() error

func (*MultithreadedRunner) Pid added in v0.8.1

func (r *MultithreadedRunner) Pid() int

func (*MultithreadedRunner) SetConnection added in v0.8.1

func (r *MultithreadedRunner) SetConnection(c net.Conn)

type Runner

type Runner interface {
	ExecuteAndGetStatus(m *gauge_messages.Message) *gauge_messages.ProtoExecutionResult
	ExecuteMessageWithTimeout(m *gauge_messages.Message) (*gauge_messages.Message, error)
	Alive() bool
	Kill() error
	Connection() net.Conn
	IsMultithreaded() bool
	Pid() int
}

func Start added in v0.6.2

func Start(manifest *manifest.Manifest, outputStreamWriter io.Writer, killChannel chan bool, debug bool) (Runner, error)

type RunnerInfo added in v0.5.0

type RunnerInfo struct {
	Id          string
	Name        string
	Version     string
	Description string
	Run         struct {
		Windows []string
		Linux   []string
		Darwin  []string
	}
	Init struct {
		Windows []string
		Linux   []string
		Darwin  []string
	}
	Lib                 string
	Multithreaded       bool
	GaugeVersionSupport version.VersionSupport
	LspLangId           string
}

func GetRunnerInfo

func GetRunnerInfo(language string) (*RunnerInfo, error)

type StartChannels

type StartChannels struct {
	// this will hold the runner
	RunnerChan chan Runner
	// this will hold the error while creating runner
	ErrorChan chan error
	// this holds a flag based on which the runner is terminated
	KillChan chan bool
}

Jump to

Keyboard shortcuts

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