Documentation
¶
Overview ¶
Package discovery coordinates read-only inspector work on an owner event loop Start uses a bounded executor supplied by the caller; Complete and Expire run on the loop. Cancellation never affects a separately scheduled command
Index ¶
- Constants
- type Reply
- type Request
- type Runner
- func (r *Runner) Cancel(context, channel, id string) bool
- func (r *Runner) Clear(context string)
- func (r *Runner) Close()
- func (r *Runner) Complete(t *Ticket, payload map[string]any, failure string, now int64) (*Reply, error)
- func (r *Runner) Expire(now int64) ([]Reply, error)
- func (r *Runner) NextDeadline() int64
- func (r *Runner) Run(ctx context.Context, e *authoring.Engine, c *sdk.Client, request Request, ...) error
- func (r *Runner) Start(ctx context.Context, request Request, now, timeout int64) (*Ticket, error)
- type Ticket
Constants ¶
const MaxPending = 32
const MaxResponseBytes = 256 << 10
const MaxTime int64 = 9007199254740991
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) Complete ¶
func (r *Runner) Complete(t *Ticket, payload map[string]any, failure string, now int64) (*Reply, error)
Complete a current ticket and ignore stale results
func (*Runner) NextDeadline ¶
Return the earliest pending discovery deadline
func (*Runner) Run ¶
func (r *Runner) Run(ctx context.Context, e *authoring.Engine, c *sdk.Client, request Request, timeout time.Duration, work func(context.Context) (map[string]any, error)) error
Run connects the coordinator to the SDK's bounded observation executor. It preserves command receipts and isolates jobs by inspector context and channel