Documentation
¶
Index ¶
- func DeserializeAttributes(eventType EventType, attributes []byte) (attr interface{}, err error)
- func SerializeAttributes(attributes interface{}) ([]byte, error)
- type ActivityCompletedAttributes
- type ActivityFailedAttributes
- type ActivityScheduledAttributes
- type Event
- type EventType
- type ExecutionCanceledAttributes
- type ExecutionCompletedAttributes
- type ExecutionStartedAttributes
- type HistoryEventOption
- type SideEffectResultAttributes
- type SignalReceivedAttributes
- type SubWorkflowCancellationRequestedAttributes
- type SubWorkflowCompletedAttributes
- type SubWorkflowFailedAttributes
- type SubWorkflowScheduledAttributes
- type TimerCanceledAttributes
- type TimerFiredAttributes
- type TimerScheduledAttributes
- type WorkflowEvent
- type WorkflowTaskStartedAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeAttributes ¶
func SerializeAttributes ¶
Types ¶
type ActivityFailedAttributes ¶
type ActivityFailedAttributes struct {
Reason string `json:"reason,omitempty"`
}
type Event ¶
type Event struct {
// ID is a unique identifier for this event
ID string `json:"id,omitempty"`
// SequenceID is a monotonically increasing sequence number this event. It's only set for events that have
// been executed and are in the history
SequenceID int64 `json:"sid,omitempty"`
Type EventType `json:"t,omitempty"`
Timestamp time.Time `json:"ts,omitempty"`
// ScheduleEventID is used to correlate events belonging together
// For example, if an activity is scheduled, ScheduleEventID of the schedule event and the
// completion/failure event are the same.
ScheduleEventID int64 `json:"seid,omitempty"`
// Attributes are event type specific attributes
Attributes interface{} `json:"attr,omitempty"`
VisibleAt *time.Time `json:"vat,omitempty"`
}
func NewHistoryEvent ¶
func NewPendingEvent ¶ added in v0.0.9
func NewPendingEvent(timestamp time.Time, eventType EventType, attributes interface{}, opts ...HistoryEventOption) Event
func (*Event) UnmarshalJSON ¶ added in v0.0.5
type EventType ¶
type EventType uint
const ( EventType_WorkflowExecutionStarted EventType EventType_WorkflowExecutionFinished EventType_WorkflowExecutionTerminated EventType_WorkflowExecutionCanceled EventType_WorkflowTaskStarted EventType_SubWorkflowScheduled EventType_SubWorkflowCancellationRequested EventType_SubWorkflowCompleted EventType_SubWorkflowFailed EventType_ActivityScheduled EventType_ActivityCompleted EventType_ActivityFailed EventType_TimerScheduled EventType_TimerFired EventType_TimerCanceled EventType_SignalReceived EventType_SideEffectResult )
type ExecutionCanceledAttributes ¶
type ExecutionCanceledAttributes struct {
}
type HistoryEventOption ¶
type HistoryEventOption func(e *Event)
func ScheduleEventID ¶
func ScheduleEventID(scheduleEventID int64) HistoryEventOption
func VisibleAt ¶
func VisibleAt(visibleAt time.Time) HistoryEventOption
type SubWorkflowCancellationRequestedAttributes ¶ added in v0.1.0
type SubWorkflowCancellationRequestedAttributes struct {
SubWorkflowInstance *core.WorkflowInstance `json:"sub_workflow_instance,omitempty"`
}
type SubWorkflowFailedAttributes ¶
type SubWorkflowFailedAttributes struct {
Error string `json:"error,omitempty"`
}
type SubWorkflowScheduledAttributes ¶
type SubWorkflowScheduledAttributes struct {
SubWorkflowInstance *core.WorkflowInstance `json:"sub_workflow_instance,omitempty"`
Name string `json:"name,omitempty"`
Inputs []payload.Payload `json:"inputs,omitempty"`
}
type TimerCanceledAttributes ¶ added in v0.1.0
type TimerCanceledAttributes struct{}
type TimerFiredAttributes ¶
type WorkflowEvent ¶
type WorkflowEvent struct {
WorkflowInstance *core.WorkflowInstance `json:"workflow_instance,omitempty"`
HistoryEvent Event `json:"history_event,omitempty"`
}
WorkflowEvent is a event addressed for a specific workflow instance
type WorkflowTaskStartedAttributes ¶
type WorkflowTaskStartedAttributes struct {
}
Source Files
¶
- activity_completed.go
- activity_failed.go
- activity_scheduled.go
- history.go
- serialization.go
- side_effect_result.go
- signal_received.go
- subworkflow_cancelation_requested.go
- subworkflow_completed.go
- subworkflow_failed.go
- subworkflow_scheduled.go
- timer_canceled.go
- timer_fired.go
- timer_scheduled.go
- workflow_canceled.go
- workflow_completed.go
- workflow_started.go
- workflow_task_started.go
- workflowevent.go
Click to show internal directories.
Click to hide internal directories.