worker

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package worker executes sessions concurrently under a single database owner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, s *store.Store, platform harness.Platform) error

Types

type AccountLimitsCollector added in v0.1.7

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

func (*AccountLimitsCollector) Register added in v0.1.7

func (c *AccountLimitsCollector) Register(id uuid.UUID, cfg session.ResolvedConfiguration, driver harness.Driver) func()

Register uses the immutable session credentials, never a re-resolved profile. The returned function must run before the driver is closed or its sandbox paused.

func (*AccountLimitsCollector) Wait added in v0.1.7

func (c *AccountLimitsCollector) Wait()

type DriverFactory

type DriverFactory func(harness.Sandbox) harness.Driver

type Executor

type Executor struct {
	ID           uuid.UUID
	Store        *store.Store
	Platform     harness.Platform
	NewDriver    DriverFactory
	NewAccount   AccountFactory
	RunnerBinary func(string) ([]byte, error)
	Limits       *AccountLimitsCollector
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(id uuid.UUID, s *store.Store, p harness.Platform) *Executor

func (*Executor) Disconnect

func (e *Executor) Disconnect()

func (*Executor) Run

func (e *Executor) Run(ctx context.Context)

func (*Executor) Tick

func (e *Executor) Tick(ctx context.Context) error

Jump to

Keyboard shortcuts

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