Documentation ¶
Index ¶
- func ExecuteInitHookForRunner(language string) error
- type GrpcRunner
- func (r *GrpcRunner) Alive() bool
- func (r *GrpcRunner) Connection() net.Conn
- func (r *GrpcRunner) ExecuteAndGetStatus(m *gm.Message) *gm.ProtoExecutionResult
- func (r *GrpcRunner) ExecuteMessageWithTimeout(message *gm.Message) (*gm.Message, error)
- func (r *GrpcRunner) Info() *RunnerInfo
- func (r *GrpcRunner) IsMultithreaded() bool
- func (r *GrpcRunner) Kill() error
- func (r *GrpcRunner) Pid() int
- type LegacyRunner
- func (r *LegacyRunner) Alive() bool
- func (r *LegacyRunner) Connection() net.Conn
- func (r *LegacyRunner) EnsureConnected() bool
- func (r *LegacyRunner) ExecuteAndGetStatus(message *gauge_messages.Message) *gauge_messages.ProtoExecutionResult
- func (r *LegacyRunner) ExecuteMessageWithTimeout(message *gauge_messages.Message) (*gauge_messages.Message, error)
- func (r *LegacyRunner) Info() *RunnerInfo
- func (r *LegacyRunner) IsMultithreaded() bool
- func (r *LegacyRunner) Kill() error
- func (r *LegacyRunner) Pid() int
- type MultithreadedRunner
- func (r *MultithreadedRunner) Alive() bool
- func (r *MultithreadedRunner) Connection() net.Conn
- func (r *MultithreadedRunner) ExecuteAndGetStatus(message *gauge_messages.Message) *gauge_messages.ProtoExecutionResult
- func (r *MultithreadedRunner) ExecuteMessageWithTimeout(message *gauge_messages.Message) (*gauge_messages.Message, error)
- func (r *MultithreadedRunner) Info() *RunnerInfo
- func (r *MultithreadedRunner) IsMultithreaded() bool
- func (r *MultithreadedRunner) Kill() error
- func (r *MultithreadedRunner) Pid() int
- func (r *MultithreadedRunner) SetConnection(c net.Conn)
- type Runner
- type RunnerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
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
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 (r *MultithreadedRunner) ExecuteAndGetStatus(message *gauge_messages.Message) *gauge_messages.ProtoExecutionResult
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 }
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)