workerhost

package
v0.1.0-alpha.49 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package workerhost shares the bounded job lifecycle used by provider workers. It owns cancellation only; model APIs, credentials and readiness stay in the provider adapters, outside the pure-Go core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jobs

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

Jobs includes queued work, so unload/reload cannot revive an old queued job. Its zero value is usable. One active job and eight queued jobs are retained.

func (*Jobs) Cancel

func (j *Jobs) Cancel(id string)

Cancel invalidates a known job without retaining unknown request IDs.

func (*Jobs) CancelAll

func (j *Jobs) CancelAll()

CancelAll invalidates both queued and currently executing jobs.

func (*Jobs) Canceled

func (j *Jobs) Canceled(id string) bool

Canceled reports whether cancellation invalidated a tracked job.

func (*Jobs) Context

func (j *Jobs) Context(id string) context.Context

Context returns the job lifetime; an unknown job is already canceled.

func (*Jobs) Finish

func (j *Jobs) Finish(id string)

Finish releases a completed job's slot and cancellation resources.

func (*Jobs) Track

func (j *Jobs) Track(id string) bool

Track reserves a bounded slot before the worker queues a new request.

Jump to

Keyboard shortcuts

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