Documentation
¶
Index ¶
- func CheckCanRun(boxFunc BoxFunc) bool
- type BoxFunc
- type BoxManager
- func (b *BoxManager) Close(ctx context.Context) error
- func (b *BoxManager) GetBox(ctx context.Context, memQuota int64) (eval.Sandbox, error)
- func (b *BoxManager) NumConcurrent() int64
- func (b *BoxManager) ReleaseBox(sb eval.Sandbox)
- func (b *BoxManager) SubRunner(ctx context.Context, numConc int64) (eval.BoxScheduler, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCanRun ¶
Types ¶
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, boxGenerator BoxFunc) (*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) NumConcurrent ¶
func (b *BoxManager) NumConcurrent() int64
func (*BoxManager) ReleaseBox ¶
func (b *BoxManager) ReleaseBox(sb eval.Sandbox)
func (*BoxManager) SubRunner ¶
func (b *BoxManager) SubRunner(ctx context.Context, numConc int64) (eval.BoxScheduler, error)
Click to show internal directories.
Click to hide internal directories.