Documentation
¶
Index ¶
- type CompileArgs
- type CompileReply
- type CompileService
- type CompileServiceStub
- type Compiler
- type CompilerServer
- func (s *CompilerServer) AddCompiler(name string, c lang.Compiler)
- func (s *CompilerServer) DelCompiler(name string)
- func (s *CompilerServer) GetCompiler(name string) lang.Compiler
- func (s *CompilerServer) Init() error
- func (s *CompilerServer) ListCompiler() []string
- func (s *CompilerServer) Loop()
- func (s *CompilerServer) Run()
- func (s *CompilerServer) Stop()
- func (s *CompilerServer) Submit(req *Request)
- type ListReply
- type Request
- type RpcServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileArgs ¶
type CompileReply ¶
type CompileReply struct {
// Unique compiling ID
Id string
// The command line used to compile this piece of code
Cmd string
// Whether the code has main function and can be executed
Error string
// Time took to compile and run the program
Time time.Duration
// Compiler's standard output
C_Output string
// Compiler's standard error
C_Error string
// The program's standard error, if compiled successfully and run
P_Output string
// The program's standard output, if compiled successfully and run
P_Error string
}
type CompileService ¶
type CompileService struct {
// contains filtered or unexported fields
}
RPC service
func NewCompileService ¶
func NewCompileService(server *CompilerServer) *CompileService
func (*CompileService) Compile ¶
func (c *CompileService) Compile(args *CompileArgs, reply *CompileReply) error
func (*CompileService) List ¶
func (c *CompileService) List(args struct{}, reply *ListReply) error
type CompileServiceStub ¶
type CompileServiceStub struct {
// contains filtered or unexported fields
}
RPC stub for the client
func NewCompileServiceStub ¶
func NewCompileServiceStub(net, addr string) (*CompileServiceStub, error)
func (*CompileServiceStub) Close ¶
func (c *CompileServiceStub) Close() error
func (*CompileServiceStub) Compile ¶
func (c *CompileServiceStub) Compile(args *CompileArgs, reply *CompileReply) error
func (*CompileServiceStub) List ¶
func (c *CompileServiceStub) List(args struct{}, reply *ListReply) error
type CompilerServer ¶
type CompilerServer struct {
// contains filtered or unexported fields
}
Compiler server
func NewCompilerServer ¶
func NewCompilerServer() *CompilerServer
func (*CompilerServer) AddCompiler ¶
func (s *CompilerServer) AddCompiler(name string, c lang.Compiler)
manage compilers
func (*CompilerServer) DelCompiler ¶
func (s *CompilerServer) DelCompiler(name string)
func (*CompilerServer) GetCompiler ¶
func (s *CompilerServer) GetCompiler(name string) lang.Compiler
func (*CompilerServer) Init ¶
func (s *CompilerServer) Init() error
func (*CompilerServer) ListCompiler ¶
func (s *CompilerServer) ListCompiler() []string
func (*CompilerServer) Loop ¶
func (s *CompilerServer) Loop()
func (*CompilerServer) Run ¶
func (s *CompilerServer) Run()
func (*CompilerServer) Stop ¶
func (s *CompilerServer) Stop()
func (*CompilerServer) Submit ¶
func (s *CompilerServer) Submit(req *Request)
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Struct holds the compile request
Click to show internal directories.
Click to hide internal directories.