(ctx context.Context, client *Client[TTx])
| 10 | var errClientNotInContext = errors.New("river: client not found in context, can only be used in a Worker") |
| 11 | |
| 12 | func withClient[TTx any](ctx context.Context, client *Client[TTx]) context.Context { |
| 13 | return context.WithValue(ctx, rivercommon.ContextKeyClient{}, client) |
| 14 | } |
| 15 | |
| 16 | // ClientFromContext returns the Client from the context. This function can |
| 17 | // only be used within a Worker's Work() method because that is the only place |
no outgoing calls
searching dependent graphs…