Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer struct {
// contains filtered or unexported fields
}
func NewBalancer ¶
func NewBalancer(service BalancerService) *Balancer
func (*Balancer) RegisterRoutes ¶
func (b *Balancer) RegisterRoutes(e *echo.Echo)
type BalancerService ¶
type BalancerService interface {
Exec(ctx context.Context, info codexec.ExecutionInfo) (*codexec.ExecutionRes, error)
}
type RemoteCodeExecuteRequest ¶
type RemoteCodeExecuteRequest struct { Lang string `json:"lang"` Content string `json:"content"` Args []string `json:"args"` }
func (RemoteCodeExecuteRequest) ToCodexecInfo ¶
func (r RemoteCodeExecuteRequest) ToCodexecInfo() codexec.ExecutionInfo
type RemoteCodeExecutionResponse ¶
type RemoteCodeExecutionResponse struct { Output string `json:"output"` ExecutionTimeMilliseconds int64 `json:"execution_time_ms"` }
func FromExecutionResult ¶
func FromExecutionResult(res *codexec.ExecutionRes) *RemoteCodeExecutionResponse
type RemoteCodeExecutor ¶
type RemoteCodeExecutor struct {
// contains filtered or unexported fields
}
func NewRemoteCodeExecutor ¶
func NewRemoteCodeExecutor(rce RemoteCodeExecutorService) *RemoteCodeExecutor
func (*RemoteCodeExecutor) Exec ¶
func (r *RemoteCodeExecutor) Exec(ctx echo.Context) error
func (*RemoteCodeExecutor) RegisterRoutes ¶
func (r *RemoteCodeExecutor) RegisterRoutes(e *echo.Echo)
type RemoteCodeExecutorService ¶
type RemoteCodeExecutorService interface {
ExecOnce(ctx context.Context, info codexec.ExecutionInfo) (*codexec.ExecutionRes, error)
}
Click to show internal directories.
Click to hide internal directories.