Documentation
¶
Overview ¶
Package client is the producer side: Enqueue tasks and await responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClientClosed = errors.New("ebind: client closed")
ErrClientClosed is returned when a future is waited on after the client closes.
Functions ¶
Types ¶
type EnqueueOptions ¶
type EnqueueOptions struct {
Deadline time.Time // absolute deadline for handler execution
TraceCtx map[string]string
RetryPolicy *task.RetryPolicy // per-task override; worker falls back to its Options defaults when nil
DAGID string // workflow-level: identifies the parent DAG
StepID string // workflow-level: identifies this step within the DAG
Target string // logical or concrete placement claim for targeted execution
// SkipResponse: don't register a waiter, return nil Future (fire-and-forget).
SkipResponse bool
}
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
func Enqueue ¶
Enqueue publishes a task. fn is a function reference used as type witness and name source. args must match fn's signature (ctx is supplied automatically on the worker side).
func EnqueueOpts ¶
func (*Future) Get ¶
Get blocks until the task response arrives or ctx is canceled. Unmarshals the result into out. Pass nil for out if the handler returns only error.
Click to show internal directories.
Click to hide internal directories.