actors

package
v1.15.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkflowNameLabelKey = "workflow"
	ActivityNameLabelKey = "activity"
	ActorTypePrefix      = "dapr.internal."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Actors

type Actors struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*Actors, error)

func (*Actors) AbandonActivityWorkItem

func (*Actors) AbandonActivityWorkItem(ctx context.Context, wi *backend.ActivityWorkItem) error

AbandonActivityWorkItem implements backend.Backend. It gets called by durabletask-go when there is an unexpected failure in the workflow activity execution pipeline.

func (*Actors) AbandonOrchestrationWorkItem

func (*Actors) AbandonOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error

AbandonOrchestrationWorkItem implements backend.Backend. It gets called by durabletask-go when there is an unexpected failure in the workflow orchestration execution pipeline.

func (*Actors) AddNewOrchestrationEvent

func (abe *Actors) AddNewOrchestrationEvent(ctx context.Context, id api.InstanceID, e *backend.HistoryEvent) error

AddNewOrchestrationEvent implements backend.Backend and sends the event e to the workflow actor identified by id.

func (*Actors) CompleteActivityWorkItem

func (*Actors) CompleteActivityWorkItem(ctx context.Context, wi *backend.ActivityWorkItem) error

CompleteActivityWorkItem implements backend.Backend

func (*Actors) CompleteOrchestrationWorkItem

func (*Actors) CompleteOrchestrationWorkItem(ctx context.Context, wi *backend.OrchestrationWorkItem) error

CompleteOrchestrationWorkItem implements backend.Backend

func (*Actors) CreateOrchestrationInstance

func (abe *Actors) CreateOrchestrationInstance(ctx context.Context, e *backend.HistoryEvent, opts ...backend.OrchestrationIdReusePolicyOptions) error

CreateOrchestrationInstance implements backend.Backend and creates a new workflow instance.

Internally, creating a workflow instance also creates a new actor with the same ID. The create request is saved into the actor's "inbox" and then executed via a reminder thread. If the app is scaled out across multiple replicas, the actor might get assigned to a replicas other than this one.

func (*Actors) CreateTaskHub

func (*Actors) CreateTaskHub(context.Context) error

CreateTaskHub implements backend.Backend

func (*Actors) DeleteTaskHub

func (*Actors) DeleteTaskHub(context.Context) error

DeleteTaskHub implements backend.Backend

func (*Actors) GetActivityWorkItem

func (abe *Actors) GetActivityWorkItem(ctx context.Context) (*backend.ActivityWorkItem, error)

GetActivityWorkItem implements backend.Backend

func (*Actors) GetOrchestrationMetadata

func (abe *Actors) GetOrchestrationMetadata(ctx context.Context, id api.InstanceID) (*backend.OrchestrationMetadata, error)

GetOrchestrationMetadata implements backend.Backend

func (*Actors) GetOrchestrationRuntimeState

func (abe *Actors) GetOrchestrationRuntimeState(ctx context.Context, owi *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, error)

GetOrchestrationRuntimeState implements backend.Backend

func (*Actors) GetOrchestrationWorkItem

func (abe *Actors) GetOrchestrationWorkItem(ctx context.Context) (*backend.OrchestrationWorkItem, error)

GetOrchestrationWorkItem implements backend.Backend

func (*Actors) PurgeOrchestrationState

func (abe *Actors) PurgeOrchestrationState(ctx context.Context, id api.InstanceID) error

PurgeOrchestrationState deletes all saved state for the specific orchestration instance.

func (*Actors) RegisterActors

func (abe *Actors) RegisterActors(ctx context.Context) error

func (*Actors) Start

func (abe *Actors) Start(ctx context.Context) error

Start implements backend.Backend

func (*Actors) Stop

func (*Actors) Stop(context.Context) error

Stop implements backend.Backend

func (*Actors) String

func (abe *Actors) String() string

String displays the type information

func (*Actors) UnRegisterActors

func (abe *Actors) UnRegisterActors(ctx context.Context) error

type Options

type Options struct {
	AppID              string
	Namespace          string
	Actors             actors.Interface
	Resiliency         resiliency.Provider
	SchedulerReminders bool
}

Jump to

Keyboard shortcuts

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