Documentation
¶
Index ¶
- func ConfigurePayloadCodecs(codecs ...converter.PayloadCodec)
- func DataConverter() converter.DataConverter
- func NewEncryptionCodec(key []byte) (converter.PayloadCodec, error)
- func RegisterTemporalClient(cli TemporalClient)
- func SetAskRoutingMode(mode AskRoutingMode)
- func SetDefaultAskTimeout(d time.Duration)
- func SetDefaultQueryTimeout(d time.Duration)
- type AskRoutingMode
- type Registration
- type Runner
- func (r *Runner) Activities() map[string]interface{}
- func (r *Runner) AddActivityObserver(observer func(string, actors.ActivityCallOptions))
- func (r *Runner) Description() *actors.Description
- func (r *Runner) RegisterWorkflow(register func(workflow interface{}))
- func (r *Runner) Workflow() interface{}
- type TemporalClient
- type WorkerConfig
- type WorkerHealthSnapshot
- type WorkerQueueStatus
- type WorkerSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurePayloadCodecs ¶
func ConfigurePayloadCodecs(codecs ...converter.PayloadCodec)
ConfigurePayloadCodecs installs the provided payload codecs on top of the runtime's data converter. Passing no codecs restores the plain CBOR converter.
func DataConverter ¶
func DataConverter() converter.DataConverter
DataConverter exposes the runtime's CBOR-backed data converter so external clients (e.g., HTTP gateways) can encode/decode payloads consistently with actors.
func NewEncryptionCodec ¶
func NewEncryptionCodec(key []byte) (converter.PayloadCodec, error)
NewEncryptionCodec creates a Temporal payload codec that wraps payloads in AES-GCM ciphertext.
func RegisterTemporalClient ¶
func RegisterTemporalClient(cli TemporalClient)
RegisterTemporalClient wires a Temporal client into the actors.Client invoker pipeline.
func SetAskRoutingMode ¶
func SetAskRoutingMode(mode AskRoutingMode)
SetAskRoutingMode switches between signal-based asks and future update routing.
func SetDefaultAskTimeout ¶
SetDefaultAskTimeout overrides the timeout used by actor-to-actor asks. Set to zero to disable.
func SetDefaultQueryTimeout ¶
SetDefaultQueryTimeout overrides the timeout used by actor-to-actor queries. Set to zero to disable.
Types ¶
type AskRoutingMode ¶
type AskRoutingMode int32
const ( AskRouteSignal AskRoutingMode = iota AskRouteUpdate )
type Registration ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner wires an actor description into a Temporal workflow entrypoint.
func (*Runner) Activities ¶
Activities returns wrappers suitable for registering with Temporal workers or tests.
func (*Runner) AddActivityObserver ¶
func (r *Runner) AddActivityObserver(observer func(string, actors.ActivityCallOptions))
AddActivityObserver registers a hook invoked with merged activity call options before execution.
func (*Runner) Description ¶
func (r *Runner) Description() *actors.Description
Description returns a clone of the underlying description.
func (*Runner) RegisterWorkflow ¶
func (r *Runner) RegisterWorkflow(register func(workflow interface{}))
RegisterWorkflow is a helper that registers the workflow with a worker/tests suite.
type TemporalClient ¶
type TemporalClient interface {
SignalWorkflow(ctx context.Context, workflowID, runID, signalName string, arg interface{}) error
SignalWithStartWorkflow(ctx context.Context, workflowID, signalName string, arg interface{}, options client.StartWorkflowOptions, workflow interface{}, workflowArgs ...interface{}) (client.WorkflowRun, error)
QueryWorkflow(ctx context.Context, workflowID, runID, queryType string, args ...interface{}) (converter.EncodedValue, error)
UpdateWorkflow(ctx context.Context, options client.UpdateWorkflowOptions) (client.WorkflowUpdateHandle, error)
DescribeWorkflowExecution(ctx context.Context, workflowID, runID string) (*workflowservicepb.DescribeWorkflowExecutionResponse, error)
ExecuteWorkflow(ctx context.Context, options client.StartWorkflowOptions, workflow interface{}, args ...interface{}) (client.WorkflowRun, error)
}
TemporalClient describes the subset of the Temporal Go SDK client needed to implement actor client proxies.
type WorkerConfig ¶
type WorkerHealthSnapshot ¶
type WorkerHealthSnapshot struct {
WorkflowQueues []WorkerQueueStatus
ActivityQueues []WorkerQueueStatus
}
WorkerHealthSnapshot summarizes the worker fleet at a point in time.
type WorkerQueueStatus ¶
WorkerQueueStatus captures queue-level health metrics.
type WorkerSet ¶
type WorkerSet struct {
// contains filtered or unexported fields
}
func NewWorkerSet ¶
func NewWorkerSet(c client.Client, defaults ...WorkerConfig) *WorkerSet
func (*WorkerSet) HealthSnapshot ¶
func (s *WorkerSet) HealthSnapshot() WorkerHealthSnapshot
HealthSnapshot reports queue-level status for workflow and activity workers.
func (*WorkerSet) Register ¶
func (s *WorkerSet) Register(actor actors.Actor, cfg WorkerConfig) (Registration, error)