Documentation ¶
Index ¶
- func CheckCanRun() bool
- type Box
- func (b *Box) Close() error
- func (b *Box) FileExists(fpath string) bool
- func (b *Box) GetID() int
- func (b *Box) MemoryQuota() int64
- func (b *Box) ReadDir(fpath string) ([]string, error)
- func (b *Box) ReadFile(fpath string, w io.Writer) error
- func (b *Box) RunCommand(ctx context.Context, command []string, conf *eval.RunConfig) (*eval.RunStats, error)
- func (b *Box) WriteFile(fpath string, r io.Reader, mode fs.FileMode) error
- type BoxManager
- type Env
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCanRun ¶
func CheckCanRun() bool
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box is the struct for the current box
func (*Box) FileExists ¶
FileExists returns if a file exists or not
func (*Box) MemoryQuota ¶
func (*Box) RunCommand ¶
type BoxManager ¶
type BoxManager struct {
// contains filtered or unexported fields
}
BoxManager manages a box with eval-based submissions
func New ¶
func New(startingNumber int, count int, maxMemory int64, dm kilonova.GraderStore, logger *zap.SugaredLogger) (*BoxManager, error)
New creates a new box manager
func (*BoxManager) Close ¶
func (b *BoxManager) Close(ctx context.Context) error
Close waits for all boxes to finish running
func (*BoxManager) ReleaseBox ¶
func (b *BoxManager) ReleaseBox(sb eval.Sandbox)
Click to show internal directories.
Click to hide internal directories.