Documentation
¶
Overview ¶
Code generated by protoc-gen-go_temporal. DO NOT EDIT. versions:
protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71) go go1.22.2 protoc (unknown)
source: example/schedule/v1/schedule.proto
Index ¶
- func CancelExampleWorkflow(ctx workflow.Context, workflowID string, runID string) error
- func CancelExampleWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future
- func RegisterExampleActivities(r worker.ActivityRegistry, c v1.ExampleClient, options ...*ExampleOptions)
- func Schedule(ctx workflow.Context, req *v1.ScheduleInput, opts ...*ScheduleWorkflowOptions) (*v1.ScheduleOutput, error)
- type ExampleOptions
- type ScheduleRun
- type ScheduleWorkflowOptions
- func (opts *ScheduleWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *ScheduleWorkflowOptions
- func (opts *ScheduleWorkflowOptions) WithDetached(d bool) *ScheduleWorkflowOptions
- func (opts *ScheduleWorkflowOptions) WithHeartbeatInterval(d time.Duration) *ScheduleWorkflowOptions
- func (opts *ScheduleWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ScheduleWorkflowOptions
- func (opts *ScheduleWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *ScheduleWorkflowOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelExampleWorkflow ¶
CancelExampleWorkflow cancels an existing workflow
func CancelExampleWorkflowAsync ¶
func CancelExampleWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future
CancelExampleWorkflowAsync cancels an existing workflow
func RegisterExampleActivities ¶
func RegisterExampleActivities(r worker.ActivityRegistry, c v1.ExampleClient, options ...*ExampleOptions)
RegisterExampleActivities registers example.schedule.v1.Example cross-namespace activities
func Schedule ¶
func Schedule(ctx workflow.Context, req *v1.ScheduleInput, opts ...*ScheduleWorkflowOptions) (*v1.ScheduleOutput, error)
Schedule executes a(n) example.schedule.v1.Schedule workflow and blocks until error or response is received
Types ¶
type ExampleOptions ¶
type ExampleOptions struct {
// contains filtered or unexported fields
}
ExampleOptions is used to configure example.schedule.v1.Example xns activity registration
func NewExampleOptions ¶
func NewExampleOptions() *ExampleOptions
NewExampleOptions initializes a new ExampleOptions value
func (*ExampleOptions) WithErrorConverter ¶
func (opts *ExampleOptions) WithErrorConverter(errorConverter func(error) error) *ExampleOptions
WithErrorConverter overrides the default error converter applied to xns activity errors
func (*ExampleOptions) WithFilter ¶
func (opts *ExampleOptions) WithFilter(filter func(string) string) *ExampleOptions
Filter is used to filter registered xns activities or customize their name
type ScheduleRun ¶
type ScheduleRun interface { // Cancel cancels the workflow Cancel(workflow.Context) error // Future returns the inner workflow.Future Future() workflow.Future // Get returns the inner workflow.Future Get(workflow.Context) (*v1.ScheduleOutput, error) // ID returns the workflow id ID() string }
ScheduleRun provides a handle to a example.schedule.v1.Schedule workflow execution
func ScheduleAsync ¶
func ScheduleAsync(ctx workflow.Context, req *v1.ScheduleInput, opts ...*ScheduleWorkflowOptions) (ScheduleRun, error)
ScheduleAsync executes a(n) example.schedule.v1.Schedule workflow and returns a handle to the underlying activity
type ScheduleWorkflowOptions ¶
type ScheduleWorkflowOptions struct { ActivityOptions *workflow.ActivityOptions Detached bool HeartbeatInterval time.Duration ParentClosePolicy enumsv1.ParentClosePolicy StartWorkflowOptions *client.StartWorkflowOptions }
ScheduleWorkflowOptions are used to configure a(n) example.schedule.v1.Schedule workflow execution
func NewScheduleWorkflowOptions ¶
func NewScheduleWorkflowOptions() *ScheduleWorkflowOptions
NewScheduleWorkflowOptions initializes a new ScheduleWorkflowOptions value
func (*ScheduleWorkflowOptions) WithActivityOptions ¶
func (opts *ScheduleWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *ScheduleWorkflowOptions
WithActivityOptions can be used to customize the activity options
func (*ScheduleWorkflowOptions) WithDetached ¶
func (opts *ScheduleWorkflowOptions) WithDetached(d bool) *ScheduleWorkflowOptions
WithDetached can be used to start a workflow execution and exit immediately
func (*ScheduleWorkflowOptions) WithHeartbeatInterval ¶
func (opts *ScheduleWorkflowOptions) WithHeartbeatInterval(d time.Duration) *ScheduleWorkflowOptions
WithHeartbeatInterval can be used to customize the activity heartbeat interval
func (*ScheduleWorkflowOptions) WithParentClosePolicy ¶
func (opts *ScheduleWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *ScheduleWorkflowOptions
WithParentClosePolicy can be used to customize the cancellation propagation behavior
func (*ScheduleWorkflowOptions) WithStartWorkflow ¶
func (opts *ScheduleWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *ScheduleWorkflowOptions
WithStartWorkflowOptions can be used to customize the start workflow options