Documentation
¶
Overview ¶
Package embedyield is the deployment-wide half of the embed gate (#1988): the embedding.Signal every replica publishes its interactive embeds to and every replica's index worker reads before it sends the embedding server background work, over the embed_interactive table (migration 000173).
A replica is one row, keyed by an id this process draws at startup, present while the replica has an interactive embed in flight. Rows are small and short-lived: a clear deletes the replica's row, and with it any row a stopped replica left past its hold.
Index ¶
Constants ¶
const DefaultHold = embedding.DefaultTimeout * time.Second
DefaultHold is how long a mark holds without being cleared: the request-path embed timeout, so a replica that stops mid-embed is waited on no longer than its embed could have lasted.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the embed_interactive table as an embedding.Signal.
func New ¶
New returns the signal for this process over db, marking for hold (DefaultHold when not positive). The process's id is random, so two replicas never share a row.
func (*Store) Busy ¶
Busy reports whether any replica, this one included, has an interactive embed in flight.