handler

package
v0.0.0-...-8eed94c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

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) Exec

func (b *Balancer) Exec(ctx echo.Context) error

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

type RemoteCodeExecutionResponse

type RemoteCodeExecutionResponse struct {
	Output                    string `json:"output"`
	ExecutionTimeMilliseconds int64  `json:"execution_time_ms"`
}

type RemoteCodeExecutor

type RemoteCodeExecutor struct {
	// contains filtered or unexported fields
}

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)
}

Jump to

Keyboard shortcuts

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