runner

package
v1.6.10 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 38

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 {
	LegacyClient gm.LspServiceClient
	RunnerClient gm.RunnerClient
	Timeout      time.Duration

	IsExecuting bool
	// contains filtered or unexported fields
}

GrpcRunner handles grpc messages.

func StartGrpcRunner added in v1.0.7

func StartGrpcRunner(m *manifest.Manifest, stdout, stderr io.Writer, timeout time.Duration, shouldWriteToStdout bool) (*GrpcRunner, error)

StartGrpcRunner makes a connection with grpc server

func (*GrpcRunner) Alive added in v1.0.4

func (r *GrpcRunner) Alive() bool

Alive check if the runner process is still alive

func (*GrpcRunner) Connection added in v0.9.8

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

Connection return the client connection

func (*GrpcRunner) ExecuteAndGetStatus added in v0.9.8

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

ExecuteAndGetStatus executes a given message and response without timeout.

func (*GrpcRunner) ExecuteMessageWithTimeout added in v0.9.8

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

ExecuteMessageWithTimeout process request and give back the response

func (*GrpcRunner) Info added in v1.0.7

func (r *GrpcRunner) Info() *RunnerInfo

Info gives the information about runner

func (*GrpcRunner) IsMultithreaded added in v0.9.8

func (r *GrpcRunner) IsMultithreaded() bool

IsMultithreaded tells if the runner has multithreaded capability

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

Pid return the runner's command pid

type LegacyRunner added in v1.0.7

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

func StartLegacyRunner added in v1.0.7

func StartLegacyRunner(manifest *manifest.Manifest, port string, outputStreamWriter *logger.LogWriter, killChannel chan bool, debug bool) (*LegacyRunner, error)

StartLegacyRunner 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 (*LegacyRunner) Alive added in v1.0.7

func (r *LegacyRunner) Alive() bool

func (*LegacyRunner) Connection added in v1.0.7

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

func (*LegacyRunner) EnsureConnected added in v1.0.7

func (r *LegacyRunner) EnsureConnected() bool

func (*LegacyRunner) ExecuteAndGetStatus added in v1.0.7

func (r *LegacyRunner) 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 (*LegacyRunner) ExecuteMessageWithTimeout added in v1.0.7

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

func (*LegacyRunner) Info added in v1.0.7

func (r *LegacyRunner) Info() *RunnerInfo

Info gives the information about runner

func (*LegacyRunner) IsMultithreaded added in v1.0.7

func (r *LegacyRunner) IsMultithreaded() bool

func (*LegacyRunner) Kill added in v1.0.7

func (r *LegacyRunner) Kill() error

func (*LegacyRunner) Pid added in v1.0.7

func (r *LegacyRunner) 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) Info added in v1.0.7

func (r *MultithreadedRunner) Info() *RunnerInfo

Info gives the information about runner

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
	Info() *RunnerInfo
	Pid() int
}

func Start added in v0.6.2

func Start(manifest *manifest.Manifest, stream int, 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
	GRPCSupport         bool
	ConceptMessages     bool
	Killed              bool
}

func GetRunnerInfo

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

Jump to

Keyboard shortcuts

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