Help us shape the future of Go! Take the 2026 Go Developer Survey

askwait

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxRounds = 3

MaxRounds caps back-and-forth on a single question thread before forcing human escalation (spec: Concurrency Model — "a capped number of back-and-forth rounds (3)").

Variables

This section is empty.

Functions

func Ask

func Ask(w *blog.Writer, from, to, question string) (string, error)

Ask posts a QUESTION entry and returns its ID, which the asker later passes to PollForAnswer.

func PollForAnswer

func PollForAnswer(logPath, questionID string) (*blog.Entry, error)

PollForAnswer looks for an ANSWER entry whose InReplyTo matches questionID. The caller (the observer, or the developer role's own step loop) is responsible for calling this repeatedly with its own backoff until the configured per-backend timeout elapses. Returns the matching Entry pointer when found, nil entry when not found yet.

func RoundsSoFar

func RoundsSoFar(entries []blog.Entry, thread string) int

RoundsSoFar counts QUESTION/ANSWER pairs sharing the same thread (Target), used to enforce MaxRounds before escalating to a human rather than looping indefinitely.

func WaitForAnswer

func WaitForAnswer(logPath, questionID string, timeout, pollInterval time.Duration) (answer string, found bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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