runner

package module
v0.0.0-...-82f95cf Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2020 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Overview

Package smoothie_runner is a generated protocol buffer package.

It is generated from these files:

smoothie-runner.proto

It has these top-level messages:

Empty
ServiceHealth
TestSolutionRequest
Solution
Problem
ProblemGrader
ProblemBatch
ProblemBatchCase
TestSolutionResponse
TestCaseResult

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSmoothieRunnerAPIServer

func RegisterSmoothieRunnerAPIServer(s *grpc.Server, srv SmoothieRunnerAPIServer)

Types

type Empty

type Empty struct {
}

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type Problem

type Problem struct {
	TestBatches       []*ProblemBatch `protobuf:"bytes,1,rep,name=testBatches" json:"testBatches,omitempty"`
	ProblemID         string          `protobuf:"bytes,2,opt,name=problemID" json:"problemID,omitempty"`
	TestCasesHashCode uint64          `protobuf:"varint,3,opt,name=testCasesHashCode" json:"testCasesHashCode,omitempty"`
	Grader            *ProblemGrader  `protobuf:"bytes,4,opt,name=grader" json:"grader,omitempty"`
	TimeLimit         float64         `protobuf:"fixed64,5,opt,name=timeLimit" json:"timeLimit,omitempty"`
	MemLimit          float64         `protobuf:"fixed64,6,opt,name=memLimit" json:"memLimit,omitempty"`
}

func (*Problem) Descriptor

func (*Problem) Descriptor() ([]byte, []int)

func (*Problem) GetGrader

func (m *Problem) GetGrader() *ProblemGrader

func (*Problem) GetMemLimit

func (m *Problem) GetMemLimit() float64

func (*Problem) GetProblemID

func (m *Problem) GetProblemID() string

func (*Problem) GetTestBatches

func (m *Problem) GetTestBatches() []*ProblemBatch

func (*Problem) GetTestCasesHashCode

func (m *Problem) GetTestCasesHashCode() uint64

func (*Problem) GetTimeLimit

func (m *Problem) GetTimeLimit() float64

func (*Problem) ProtoMessage

func (*Problem) ProtoMessage()

func (*Problem) Reset

func (m *Problem) Reset()

func (*Problem) String

func (m *Problem) String() string

type ProblemBatch

type ProblemBatch struct {
	Cases []*ProblemBatchCase `protobuf:"bytes,1,rep,name=cases" json:"cases,omitempty"`
}

func (*ProblemBatch) Descriptor

func (*ProblemBatch) Descriptor() ([]byte, []int)

func (*ProblemBatch) GetCases

func (m *ProblemBatch) GetCases() []*ProblemBatchCase

func (*ProblemBatch) ProtoMessage

func (*ProblemBatch) ProtoMessage()

func (*ProblemBatch) Reset

func (m *ProblemBatch) Reset()

func (*ProblemBatch) String

func (m *ProblemBatch) String() string

type ProblemBatchCase

type ProblemBatchCase struct {
	Input          string `protobuf:"bytes,1,opt,name=input" json:"input,omitempty"`
	ExpectedAnswer string `protobuf:"bytes,2,opt,name=expectedAnswer" json:"expectedAnswer,omitempty"`
}

func (*ProblemBatchCase) Descriptor

func (*ProblemBatchCase) Descriptor() ([]byte, []int)

func (*ProblemBatchCase) GetExpectedAnswer

func (m *ProblemBatchCase) GetExpectedAnswer() string

func (*ProblemBatchCase) GetInput

func (m *ProblemBatchCase) GetInput() string

func (*ProblemBatchCase) ProtoMessage

func (*ProblemBatchCase) ProtoMessage()

func (*ProblemBatchCase) Reset

func (m *ProblemBatchCase) Reset()

func (*ProblemBatchCase) String

func (m *ProblemBatchCase) String() string

type ProblemGrader

type ProblemGrader struct {
	Type       string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
	CustomCode string `protobuf:"bytes,2,opt,name=customCode" json:"customCode,omitempty"`
}

func (*ProblemGrader) Descriptor

func (*ProblemGrader) Descriptor() ([]byte, []int)

func (*ProblemGrader) GetCustomCode

func (m *ProblemGrader) GetCustomCode() string

func (*ProblemGrader) GetType

func (m *ProblemGrader) GetType() string

func (*ProblemGrader) ProtoMessage

func (*ProblemGrader) ProtoMessage()

func (*ProblemGrader) Reset

func (m *ProblemGrader) Reset()

func (*ProblemGrader) String

func (m *ProblemGrader) String() string

type ServiceHealth

type ServiceHealth struct {
	NumOfTasksToBeDone uint64 `protobuf:"varint,1,opt,name=numOfTasksToBeDone" json:"numOfTasksToBeDone,omitempty"`
	NumOfTasksInQueue  uint64 `protobuf:"varint,2,opt,name=numOfTasksInQueue" json:"numOfTasksInQueue,omitempty"`
	NumOfWorkers       uint64 `protobuf:"varint,3,opt,name=numOfWorkers" json:"numOfWorkers,omitempty"`
}

func (*ServiceHealth) Descriptor

func (*ServiceHealth) Descriptor() ([]byte, []int)

func (*ServiceHealth) GetNumOfTasksInQueue

func (m *ServiceHealth) GetNumOfTasksInQueue() uint64

func (*ServiceHealth) GetNumOfTasksToBeDone

func (m *ServiceHealth) GetNumOfTasksToBeDone() uint64

func (*ServiceHealth) GetNumOfWorkers

func (m *ServiceHealth) GetNumOfWorkers() uint64

func (*ServiceHealth) ProtoMessage

func (*ServiceHealth) ProtoMessage()

func (*ServiceHealth) Reset

func (m *ServiceHealth) Reset()

func (*ServiceHealth) String

func (m *ServiceHealth) String() string

type SmoothieRunnerAPIClient

type SmoothieRunnerAPIClient interface {
	TestSolution(ctx context.Context, opts ...grpc.CallOption) (SmoothieRunnerAPI_TestSolutionClient, error)
	Health(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ServiceHealth, error)
}

func NewSmoothieRunnerAPIClient

func NewSmoothieRunnerAPIClient(cc *grpc.ClientConn) SmoothieRunnerAPIClient

type SmoothieRunnerAPIServer

type SmoothieRunnerAPIServer interface {
	TestSolution(SmoothieRunnerAPI_TestSolutionServer) error
	Health(context.Context, *Empty) (*ServiceHealth, error)
}

type SmoothieRunnerAPI_TestSolutionClient

type SmoothieRunnerAPI_TestSolutionClient interface {
	Send(*TestSolutionRequest) error
	Recv() (*TestSolutionResponse, error)
	grpc.ClientStream
}

type SmoothieRunnerAPI_TestSolutionServer

type SmoothieRunnerAPI_TestSolutionServer interface {
	Send(*TestSolutionResponse) error
	Recv() (*TestSolutionRequest, error)
	grpc.ServerStream
}

type Solution

type Solution struct {
	Language string `protobuf:"bytes,1,opt,name=language" json:"language,omitempty"`
	Code     string `protobuf:"bytes,2,opt,name=code" json:"code,omitempty"`
}

func (*Solution) Descriptor

func (*Solution) Descriptor() ([]byte, []int)

func (*Solution) GetCode

func (m *Solution) GetCode() string

func (*Solution) GetLanguage

func (m *Solution) GetLanguage() string

func (*Solution) ProtoMessage

func (*Solution) ProtoMessage()

func (*Solution) Reset

func (m *Solution) Reset()

func (*Solution) String

func (m *Solution) String() string

type TestCaseResult

type TestCaseResult struct {
	BatchNumber uint64  `protobuf:"varint,1,opt,name=batchNumber" json:"batchNumber,omitempty"`
	CaseNumber  uint64  `protobuf:"varint,2,opt,name=caseNumber" json:"caseNumber,omitempty"`
	Result      string  `protobuf:"bytes,3,opt,name=result" json:"result,omitempty"`
	ResultInfo  string  `protobuf:"bytes,4,opt,name=resultInfo" json:"resultInfo,omitempty"`
	Time        float64 `protobuf:"fixed64,5,opt,name=time" json:"time,omitempty"`
	MemUsage    float64 `protobuf:"fixed64,6,opt,name=memUsage" json:"memUsage,omitempty"`
}

func (*TestCaseResult) Descriptor

func (*TestCaseResult) Descriptor() ([]byte, []int)

func (*TestCaseResult) GetBatchNumber

func (m *TestCaseResult) GetBatchNumber() uint64

func (*TestCaseResult) GetCaseNumber

func (m *TestCaseResult) GetCaseNumber() uint64

func (*TestCaseResult) GetMemUsage

func (m *TestCaseResult) GetMemUsage() float64

func (*TestCaseResult) GetResult

func (m *TestCaseResult) GetResult() string

func (*TestCaseResult) GetResultInfo

func (m *TestCaseResult) GetResultInfo() string

func (*TestCaseResult) GetTime

func (m *TestCaseResult) GetTime() float64

func (*TestCaseResult) ProtoMessage

func (*TestCaseResult) ProtoMessage()

func (*TestCaseResult) Reset

func (m *TestCaseResult) Reset()

func (*TestCaseResult) String

func (m *TestCaseResult) String() string

type TestSolutionRequest

type TestSolutionRequest struct {
	Problem               *Problem  `protobuf:"bytes,1,opt,name=problem" json:"problem,omitempty"`
	Solution              *Solution `protobuf:"bytes,2,opt,name=solution" json:"solution,omitempty"`
	TestBatchEvenIfFailed bool      `protobuf:"varint,3,opt,name=testBatchEvenIfFailed" json:"testBatchEvenIfFailed,omitempty"`
	CancelTesting         bool      `protobuf:"varint,4,opt,name=cancelTesting" json:"cancelTesting,omitempty"`
}

func (*TestSolutionRequest) Descriptor

func (*TestSolutionRequest) Descriptor() ([]byte, []int)

func (*TestSolutionRequest) GetCancelTesting

func (m *TestSolutionRequest) GetCancelTesting() bool

func (*TestSolutionRequest) GetProblem

func (m *TestSolutionRequest) GetProblem() *Problem

func (*TestSolutionRequest) GetSolution

func (m *TestSolutionRequest) GetSolution() *Solution

func (*TestSolutionRequest) GetTestBatchEvenIfFailed

func (m *TestSolutionRequest) GetTestBatchEvenIfFailed() bool

func (*TestSolutionRequest) ProtoMessage

func (*TestSolutionRequest) ProtoMessage()

func (*TestSolutionRequest) Reset

func (m *TestSolutionRequest) Reset()

func (*TestSolutionRequest) String

func (m *TestSolutionRequest) String() string

type TestSolutionResponse

type TestSolutionResponse struct {
	TestCaseResult   *TestCaseResult `protobuf:"bytes,1,opt,name=testCaseResult" json:"testCaseResult,omitempty"`
	CompletedTesting bool            `protobuf:"varint,2,opt,name=completedTesting" json:"completedTesting,omitempty"`
	CompileError     string          `protobuf:"bytes,3,opt,name=compileError" json:"compileError,omitempty"`
}

func (*TestSolutionResponse) Descriptor

func (*TestSolutionResponse) Descriptor() ([]byte, []int)

func (*TestSolutionResponse) GetCompileError

func (m *TestSolutionResponse) GetCompileError() string

func (*TestSolutionResponse) GetCompletedTesting

func (m *TestSolutionResponse) GetCompletedTesting() bool

func (*TestSolutionResponse) GetTestCaseResult

func (m *TestSolutionResponse) GetTestCaseResult() *TestCaseResult

func (*TestSolutionResponse) ProtoMessage

func (*TestSolutionResponse) ProtoMessage()

func (*TestSolutionResponse) Reset

func (m *TestSolutionResponse) Reset()

func (*TestSolutionResponse) String

func (m *TestSolutionResponse) String() string

Jump to

Keyboard shortcuts

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