Documentation ¶
Index ¶
- func CheckCanRun(boxFunc BoxFunc) bool
- type BoxFunc
- type BoxManager
- func (b *BoxManager) Close(ctx context.Context) error
- func (b *BoxManager) NumConcurrent() int64
- func (mgr *BoxManager) RunBox2(ctx context.Context, req *eval.Box2Request, memQuota int64) (*eval.Box2Response, error)
- 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, logger *slog.Logger, 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) RunBox2 ¶ added in v0.25.0
func (mgr *BoxManager) RunBox2(ctx context.Context, req *eval.Box2Request, memQuota int64) (*eval.Box2Response, error)
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.