simplepb

package
v0.0.0-...-cf623d3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SomeWorkflow1Name     = "mycompany.simple.Simple.SomeWorkflow1"
	SomeWorkflow2Name     = "mycompany.simple.Simple.SomeWorkflow2"
	SomeWorkflow3Name     = "mycompany.simple.Simple.SomeWorkflow3"
	SomeActivity1Name     = "mycompany.simple.Simple.SomeActivity1"
	SomeActivity2Name     = "mycompany.simple.Simple.SomeActivity2"
	SomeActivity3Name     = "mycompany.simple.Simple.SomeActivity3"
	SomeQuery1Name        = "mycompany.simple.Simple.SomeQuery1"
	SomeQuery2Name        = "mycompany.simple.Simple.SomeQuery2"
	SomeSignal1Name       = "mycompany.simple.Simple.SomeSignal1"
	SomeSignal2Name       = "mycompany.simple.Simple.SomeSignal2"
	SomeCall1SignalName   = "mycompany.simple.Simple.SomeCall1"
	SomeCall1ResponseName = SomeCall1SignalName + "-response"
)

Constants used as workflow, activity, query, and signal names.

Variables

View Source
var File_test_simplepb_simple_proto protoreflect.FileDescriptor

Functions

func BuildSomeWorkflow1

BuildSomeWorkflow1 returns a function for the given impl.

func BuildSomeWorkflow2

func BuildSomeWorkflow2(newImpl func(workflow.Context, *SomeWorkflow2Input) (SomeWorkflow2Impl, error)) func(ctx workflow.Context) error

BuildSomeWorkflow2 returns a function for the given impl.

func BuildSomeWorkflow3

func BuildSomeWorkflow3(newImpl func(workflow.Context, *SomeWorkflow3Input) (SomeWorkflow3Impl, error)) func(ctx workflow.Context, req *SomeWorkflow3Request) error

BuildSomeWorkflow3 returns a function for the given impl.

func RegisterActivities

func RegisterActivities(r worker.ActivityRegistry, a ActivitiesImpl)

RegisterActivities registers all activities in the interface.

func RegisterSomeActivity1

func RegisterSomeActivity1(r worker.ActivityRegistry, impl func(context.Context) error)

RegisterSomeActivity1 registers the single activity.

func RegisterSomeActivity2

func RegisterSomeActivity2(r worker.ActivityRegistry, impl func(context.Context, *SomeActivity2Request) error)

RegisterSomeActivity2 registers the single activity.

func RegisterSomeActivity3

func RegisterSomeActivity3(r worker.ActivityRegistry, impl func(context.Context, *SomeActivity3Request) (*SomeActivity3Response, error))

RegisterSomeActivity3 registers the single activity.

func RegisterSomeWorkflow1

func RegisterSomeWorkflow1(r worker.WorkflowRegistry, newImpl func(workflow.Context, *SomeWorkflow1Input) (SomeWorkflow1Impl, error))

RegisterSomeWorkflow1 registers a workflow with the given impl.

func RegisterSomeWorkflow2

func RegisterSomeWorkflow2(r worker.WorkflowRegistry, newImpl func(workflow.Context, *SomeWorkflow2Input) (SomeWorkflow2Impl, error))

RegisterSomeWorkflow2 registers a workflow with the given impl.

func RegisterSomeWorkflow3

func RegisterSomeWorkflow3(r worker.WorkflowRegistry, newImpl func(workflow.Context, *SomeWorkflow3Input) (SomeWorkflow3Impl, error))

RegisterSomeWorkflow3 registers a workflow with the given impl.

func SomeSignal1External

func SomeSignal1External(ctx workflow.Context, workflowID, runID string) workflow.Future

SomeSignal1 is a signal.

func SomeSignal2External

func SomeSignal2External(ctx workflow.Context, workflowID, runID string, req *SomeSignal2Request) workflow.Future

SomeSignal2 is a signal.

Types

type ActivitiesImpl

type ActivitiesImpl interface {

	// SomeActivity1 does some activity thing.
	SomeActivity1(context.Context) error

	// SomeActivity2 does some activity thing.
	SomeActivity2(context.Context, *SomeActivity2Request) error

	// SomeActivity3 does some activity thing.
	SomeActivity3(context.Context, *SomeActivity3Request) (*SomeActivity3Response, error)
}

ActivitiesImpl is an interface for activity implementations.

type CallResponseHandler

type CallResponseHandler interface {
	// TaskQueue returns the task queue for response activities.
	TaskQueue() string

	// PrepareCall creates a new ID and channels to receive response/error.
	// Each channel only has a buffer of one and are never closed and only one is ever sent to.
	// If context is closed, the context error is returned on error channel.
	PrepareCall(ctx context.Context) (id string, chOk <-chan interface{}, chErr <-chan error)

	// AddResponseType adds an activity for the given type and ID field.
	// Does not error if activity name already exists for the same params.
	AddResponseType(activityName string, typ reflect.Type, idField string) error
}

CallResponseHandler handles activity responses.

type Client

type Client interface {

	// SomeWorkflow1 does some workflow thing.
	ExecuteSomeWorkflow1(ctx context.Context, opts *client.StartWorkflowOptions, req *SomeWorkflow1Request) (SomeWorkflow1Run, error)

	// GetSomeWorkflow1 returns an existing run started by ExecuteSomeWorkflow1.
	GetSomeWorkflow1(ctx context.Context, workflowID, runID string) (SomeWorkflow1Run, error)

	// SomeWorkflow2 does some workflow thing.
	ExecuteSomeWorkflow2(ctx context.Context, opts *client.StartWorkflowOptions, signalStart bool) (SomeWorkflow2Run, error)

	// GetSomeWorkflow2 returns an existing run started by ExecuteSomeWorkflow2.
	GetSomeWorkflow2(ctx context.Context, workflowID, runID string) (SomeWorkflow2Run, error)

	// SomeWorkflow3 does some workflow thing.
	ExecuteSomeWorkflow3(ctx context.Context, opts *client.StartWorkflowOptions, req *SomeWorkflow3Request, signalStart *SomeSignal2Request) (SomeWorkflow3Run, error)

	// GetSomeWorkflow3 returns an existing run started by ExecuteSomeWorkflow3.
	GetSomeWorkflow3(ctx context.Context, workflowID, runID string) (SomeWorkflow3Run, error)

	// SomeQuery1 queries some thing.
	SomeQuery1(ctx context.Context, workflowID, runID string) (*SomeQuery1Response, error)

	// SomeQuery2 queries some thing.
	SomeQuery2(ctx context.Context, workflowID, runID string, req *SomeQuery2Request) (*SomeQuery2Response, error)

	// SomeSignal1 is a signal.
	SomeSignal1(ctx context.Context, workflowID, runID string) error

	// SomeSignal2 is a signal.
	SomeSignal2(ctx context.Context, workflowID, runID string, req *SomeSignal2Request) error

	// SomeCall1 is a call.
	SomeCall1(ctx context.Context, workflowID, runID string, req *SomeCall1Request) (*SomeCall1Response, error)
}

func NewClient

func NewClient(opts ClientOptions) Client

NewClient creates a new Client.

type ClientOptions

type ClientOptions struct {
	// Required client.
	Client client.Client
	// Handler that must be present for client calls to succeed.
	CallResponseHandler CallResponseHandler
}

ClientOptions are used for NewClient.

type SomeActivity1Future

type SomeActivity1Future struct{ Future workflow.Future }

SomeActivity1Future represents completion of the activity.

func SomeActivity1

SomeActivity1 does some activity thing.

func SomeActivity1Local

func SomeActivity1Local(ctx workflow.Context, opts *workflow.LocalActivityOptions, fn func(context.Context) error) SomeActivity1Future

SomeActivity1 does some activity thing.

func (SomeActivity1Future) Get

Get waits for completion.

func (SomeActivity1Future) Select

Select adds the completion to the selector. Callback can be nil.

type SomeActivity2Future

type SomeActivity2Future struct{ Future workflow.Future }

SomeActivity2Future represents completion of the activity.

func SomeActivity2

SomeActivity2 does some activity thing.

func SomeActivity2Local

SomeActivity2 does some activity thing.

func (SomeActivity2Future) Get

Get waits for completion.

func (SomeActivity2Future) Select

Select adds the completion to the selector. Callback can be nil.

type SomeActivity2Request

type SomeActivity2Request struct {
	RequestVal string `protobuf:"bytes,1,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeActivity2Request) Descriptor deprecated

func (*SomeActivity2Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeActivity2Request.ProtoReflect.Descriptor instead.

func (*SomeActivity2Request) GetRequestVal

func (x *SomeActivity2Request) GetRequestVal() string

func (*SomeActivity2Request) ProtoMessage

func (*SomeActivity2Request) ProtoMessage()

func (*SomeActivity2Request) ProtoReflect

func (x *SomeActivity2Request) ProtoReflect() protoreflect.Message

func (*SomeActivity2Request) Reset

func (x *SomeActivity2Request) Reset()

func (*SomeActivity2Request) String

func (x *SomeActivity2Request) String() string

type SomeActivity3Future

type SomeActivity3Future struct{ Future workflow.Future }

SomeActivity3Future represents completion of the activity.

func SomeActivity3

SomeActivity3 does some activity thing.

func SomeActivity3Local

SomeActivity3 does some activity thing.

func (SomeActivity3Future) Get

Get waits for completion.

func (SomeActivity3Future) Select

Select adds the completion to the selector. Callback can be nil.

type SomeActivity3Request

type SomeActivity3Request struct {
	RequestVal string `protobuf:"bytes,1,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeActivity3Request) Descriptor deprecated

func (*SomeActivity3Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeActivity3Request.ProtoReflect.Descriptor instead.

func (*SomeActivity3Request) GetRequestVal

func (x *SomeActivity3Request) GetRequestVal() string

func (*SomeActivity3Request) ProtoMessage

func (*SomeActivity3Request) ProtoMessage()

func (*SomeActivity3Request) ProtoReflect

func (x *SomeActivity3Request) ProtoReflect() protoreflect.Message

func (*SomeActivity3Request) Reset

func (x *SomeActivity3Request) Reset()

func (*SomeActivity3Request) String

func (x *SomeActivity3Request) String() string

type SomeActivity3Response

type SomeActivity3Response struct {
	ResponseVal string `protobuf:"bytes,1,opt,name=response_val,json=responseVal,proto3" json:"response_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeActivity3Response) Descriptor deprecated

func (*SomeActivity3Response) Descriptor() ([]byte, []int)

Deprecated: Use SomeActivity3Response.ProtoReflect.Descriptor instead.

func (*SomeActivity3Response) GetResponseVal

func (x *SomeActivity3Response) GetResponseVal() string

func (*SomeActivity3Response) ProtoMessage

func (*SomeActivity3Response) ProtoMessage()

func (*SomeActivity3Response) ProtoReflect

func (x *SomeActivity3Response) ProtoReflect() protoreflect.Message

func (*SomeActivity3Response) Reset

func (x *SomeActivity3Response) Reset()

func (*SomeActivity3Response) String

func (x *SomeActivity3Response) String() string

type SomeCall1

type SomeCall1 struct{ Channel workflow.ReceiveChannel }

SomeCall1 is a call.

func (SomeCall1) Receive

func (s SomeCall1) Receive(ctx workflow.Context) *SomeCall1Request

Receive blocks until call is received.

func (SomeCall1) ReceiveAsync

func (s SomeCall1) ReceiveAsync() *SomeCall1Request

ReceiveAsync returns received signal or nil if none.

func (SomeCall1) Respond

Respond sends a response. Activity options not used if request received via another workflow. If activity options needed and not present, they are taken from the context.

func (SomeCall1) Select

func (s SomeCall1) Select(sel workflow.Selector, fn func(*SomeCall1Request)) workflow.Selector

Select adds the callback to the selector to be invoked when signal received. Callback can be nil

type SomeCall1Request

type SomeCall1Request struct {
	Id                 string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ResponseTaskQueue  string `protobuf:"bytes,2,opt,name=response_task_queue,json=responseTaskQueue,proto3" json:"response_task_queue,omitempty"`
	ResponseWorkflowId string `protobuf:"bytes,3,opt,name=response_workflow_id,json=responseWorkflowId,proto3" json:"response_workflow_id,omitempty"`
	RequestVal         string `protobuf:"bytes,4,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeCall1Request) Descriptor deprecated

func (*SomeCall1Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeCall1Request.ProtoReflect.Descriptor instead.

func (*SomeCall1Request) GetId

func (x *SomeCall1Request) GetId() string

func (*SomeCall1Request) GetRequestVal

func (x *SomeCall1Request) GetRequestVal() string

func (*SomeCall1Request) GetResponseTaskQueue

func (x *SomeCall1Request) GetResponseTaskQueue() string

func (*SomeCall1Request) GetResponseWorkflowId

func (x *SomeCall1Request) GetResponseWorkflowId() string

func (*SomeCall1Request) ProtoMessage

func (*SomeCall1Request) ProtoMessage()

func (*SomeCall1Request) ProtoReflect

func (x *SomeCall1Request) ProtoReflect() protoreflect.Message

func (*SomeCall1Request) Reset

func (x *SomeCall1Request) Reset()

func (*SomeCall1Request) String

func (x *SomeCall1Request) String() string

type SomeCall1Response

type SomeCall1Response struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ResponseVal string `protobuf:"bytes,2,opt,name=response_val,json=responseVal,proto3" json:"response_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeCall1Response) Descriptor deprecated

func (*SomeCall1Response) Descriptor() ([]byte, []int)

Deprecated: Use SomeCall1Response.ProtoReflect.Descriptor instead.

func (*SomeCall1Response) GetId

func (x *SomeCall1Response) GetId() string

func (*SomeCall1Response) GetResponseVal

func (x *SomeCall1Response) GetResponseVal() string

func (*SomeCall1Response) ProtoMessage

func (*SomeCall1Response) ProtoMessage()

func (*SomeCall1Response) ProtoReflect

func (x *SomeCall1Response) ProtoReflect() protoreflect.Message

func (*SomeCall1Response) Reset

func (x *SomeCall1Response) Reset()

func (*SomeCall1Response) String

func (x *SomeCall1Response) String() string

type SomeCall1ResponseExternal

type SomeCall1ResponseExternal struct {
	Future  workflow.Future
	Channel workflow.ReceiveChannel
}

SomeCall1ResponseExternal represents a call response.

func SomeCall1External

func SomeCall1External(ctx workflow.Context, workflowID, runID string, req *SomeCall1Request) (SomeCall1ResponseExternal, error)

SomeCall1 is a call.

func (SomeCall1ResponseExternal) Receive

Receive blocks until response is received.

func (SomeCall1ResponseExternal) ReceiveAsync

func (e SomeCall1ResponseExternal) ReceiveAsync() *SomeCall1Response

ReceiveAsync returns response or nil if none.

func (SomeCall1ResponseExternal) Select

Select adds the callback to the selector to be invoked when response received. Callback can be nil

func (SomeCall1ResponseExternal) SelectSent

SelectSent adds when a request is sent to the selector. Callback can be nil.

func (SomeCall1ResponseExternal) WaitSent

WaitSent blocks until the request is sent.

type SomeQuery1Response

type SomeQuery1Response struct {
	ResponseVal string `protobuf:"bytes,1,opt,name=response_val,json=responseVal,proto3" json:"response_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeQuery1Response) Descriptor deprecated

func (*SomeQuery1Response) Descriptor() ([]byte, []int)

Deprecated: Use SomeQuery1Response.ProtoReflect.Descriptor instead.

func (*SomeQuery1Response) GetResponseVal

func (x *SomeQuery1Response) GetResponseVal() string

func (*SomeQuery1Response) ProtoMessage

func (*SomeQuery1Response) ProtoMessage()

func (*SomeQuery1Response) ProtoReflect

func (x *SomeQuery1Response) ProtoReflect() protoreflect.Message

func (*SomeQuery1Response) Reset

func (x *SomeQuery1Response) Reset()

func (*SomeQuery1Response) String

func (x *SomeQuery1Response) String() string

type SomeQuery2Request

type SomeQuery2Request struct {
	RequestVal string `protobuf:"bytes,1,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeQuery2Request) Descriptor deprecated

func (*SomeQuery2Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeQuery2Request.ProtoReflect.Descriptor instead.

func (*SomeQuery2Request) GetRequestVal

func (x *SomeQuery2Request) GetRequestVal() string

func (*SomeQuery2Request) ProtoMessage

func (*SomeQuery2Request) ProtoMessage()

func (*SomeQuery2Request) ProtoReflect

func (x *SomeQuery2Request) ProtoReflect() protoreflect.Message

func (*SomeQuery2Request) Reset

func (x *SomeQuery2Request) Reset()

func (*SomeQuery2Request) String

func (x *SomeQuery2Request) String() string

type SomeQuery2Response

type SomeQuery2Response struct {
	ResponseVal string `protobuf:"bytes,1,opt,name=response_val,json=responseVal,proto3" json:"response_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeQuery2Response) Descriptor deprecated

func (*SomeQuery2Response) Descriptor() ([]byte, []int)

Deprecated: Use SomeQuery2Response.ProtoReflect.Descriptor instead.

func (*SomeQuery2Response) GetResponseVal

func (x *SomeQuery2Response) GetResponseVal() string

func (*SomeQuery2Response) ProtoMessage

func (*SomeQuery2Response) ProtoMessage()

func (*SomeQuery2Response) ProtoReflect

func (x *SomeQuery2Response) ProtoReflect() protoreflect.Message

func (*SomeQuery2Response) Reset

func (x *SomeQuery2Response) Reset()

func (*SomeQuery2Response) String

func (x *SomeQuery2Response) String() string

type SomeSignal1

type SomeSignal1 struct{ Channel workflow.ReceiveChannel }

SomeSignal1 is a signal.

func (SomeSignal1) Receive

func (s SomeSignal1) Receive(ctx workflow.Context)

Receive blocks until signal is received.

func (SomeSignal1) ReceiveAsync

func (s SomeSignal1) ReceiveAsync() (received bool)

ReceiveAsync returns true if signal received or false if not.

func (SomeSignal1) Select

func (s SomeSignal1) Select(sel workflow.Selector, fn func()) workflow.Selector

Select adds the callback to the selector to be invoked when signal received. Callback can be nil.

type SomeSignal2

type SomeSignal2 struct{ Channel workflow.ReceiveChannel }

SomeSignal2 is a signal.

func (SomeSignal2) Receive

Receive blocks until signal is received.

func (SomeSignal2) ReceiveAsync

func (s SomeSignal2) ReceiveAsync() *SomeSignal2Request

ReceiveAsync returns received signal or nil if none.

func (SomeSignal2) Select

Select adds the callback to the selector to be invoked when signal received. Callback can be nil.

type SomeSignal2Request

type SomeSignal2Request struct {
	RequestVal string `protobuf:"bytes,1,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeSignal2Request) Descriptor deprecated

func (*SomeSignal2Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeSignal2Request.ProtoReflect.Descriptor instead.

func (*SomeSignal2Request) GetRequestVal

func (x *SomeSignal2Request) GetRequestVal() string

func (*SomeSignal2Request) ProtoMessage

func (*SomeSignal2Request) ProtoMessage()

func (*SomeSignal2Request) ProtoReflect

func (x *SomeSignal2Request) ProtoReflect() protoreflect.Message

func (*SomeSignal2Request) Reset

func (x *SomeSignal2Request) Reset()

func (*SomeSignal2Request) String

func (x *SomeSignal2Request) String() string

type SomeWorkflow1ChildRun

type SomeWorkflow1ChildRun struct{ Future workflow.ChildWorkflowFuture }

SomeWorkflow1ChildRun is a future for the child workflow.

func SomeWorkflow1Child

SomeWorkflow1Child executes a child workflow. If options not present, they are taken from the context.

func (SomeWorkflow1ChildRun) Get

Get returns the completed workflow value, waiting if necessary.

func (SomeWorkflow1ChildRun) Select

Select adds this completion to the selector. Callback can be nil.

func (SomeWorkflow1ChildRun) SelectStart

SelectStart adds waiting for start to the selector. Callback can be nil.

func (SomeWorkflow1ChildRun) SomeCall1

SomeCall1 is a call.

func (SomeWorkflow1ChildRun) SomeSignal1

SomeSignal1 is a signal.

func (SomeWorkflow1ChildRun) SomeSignal2

SomeSignal2 is a signal.

func (SomeWorkflow1ChildRun) WaitStart

WaitStart waits for the child workflow to start.

type SomeWorkflow1Impl

type SomeWorkflow1Impl interface {
	Run(workflow.Context) (*SomeWorkflow1Response, error)

	SomeQuery1() (*SomeQuery1Response, error)

	SomeQuery2(*SomeQuery2Request) (*SomeQuery2Response, error)
}

SomeWorkflow1 does some workflow thing.

type SomeWorkflow1Input

type SomeWorkflow1Input struct {
	Req         *SomeWorkflow1Request
	SomeSignal1 SomeSignal1
	SomeSignal2 SomeSignal2
	SomeCall1   SomeCall1
}

SomeWorkflow1Input is input provided to SomeWorkflow1Impl.Run.

type SomeWorkflow1Request

type SomeWorkflow1Request struct {
	RequestVal string `protobuf:"bytes,1,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeWorkflow1Request) Descriptor deprecated

func (*SomeWorkflow1Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeWorkflow1Request.ProtoReflect.Descriptor instead.

func (*SomeWorkflow1Request) GetRequestVal

func (x *SomeWorkflow1Request) GetRequestVal() string

func (*SomeWorkflow1Request) ProtoMessage

func (*SomeWorkflow1Request) ProtoMessage()

func (*SomeWorkflow1Request) ProtoReflect

func (x *SomeWorkflow1Request) ProtoReflect() protoreflect.Message

func (*SomeWorkflow1Request) Reset

func (x *SomeWorkflow1Request) Reset()

func (*SomeWorkflow1Request) String

func (x *SomeWorkflow1Request) String() string

type SomeWorkflow1Response

type SomeWorkflow1Response struct {
	ResponseVal string `protobuf:"bytes,1,opt,name=response_val,json=responseVal,proto3" json:"response_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeWorkflow1Response) Descriptor deprecated

func (*SomeWorkflow1Response) Descriptor() ([]byte, []int)

Deprecated: Use SomeWorkflow1Response.ProtoReflect.Descriptor instead.

func (*SomeWorkflow1Response) GetResponseVal

func (x *SomeWorkflow1Response) GetResponseVal() string

func (*SomeWorkflow1Response) ProtoMessage

func (*SomeWorkflow1Response) ProtoMessage()

func (*SomeWorkflow1Response) ProtoReflect

func (x *SomeWorkflow1Response) ProtoReflect() protoreflect.Message

func (*SomeWorkflow1Response) Reset

func (x *SomeWorkflow1Response) Reset()

func (*SomeWorkflow1Response) String

func (x *SomeWorkflow1Response) String() string

type SomeWorkflow1Run

type SomeWorkflow1Run interface {
	// ID is the workflow ID.
	ID() string

	// RunID is the workflow run ID.
	RunID() string

	// Get returns the completed workflow value, waiting if necessary.
	Get(ctx context.Context) (*SomeWorkflow1Response, error)

	// SomeQuery1 queries some thing.
	SomeQuery1(ctx context.Context) (*SomeQuery1Response, error)

	// SomeQuery2 queries some thing.
	SomeQuery2(ctx context.Context, req *SomeQuery2Request) (*SomeQuery2Response, error)

	// SomeSignal1 is a signal.
	SomeSignal1(ctx context.Context) error

	// SomeSignal2 is a signal.
	SomeSignal2(ctx context.Context, req *SomeSignal2Request) error

	// SomeCall1 is a call.
	SomeCall1(ctx context.Context, req *SomeCall1Request) (*SomeCall1Response, error)
}

SomeWorkflow1Run represents an execution of SomeWorkflow1.

type SomeWorkflow2ChildRun

type SomeWorkflow2ChildRun struct{ Future workflow.ChildWorkflowFuture }

SomeWorkflow2ChildRun is a future for the child workflow.

func SomeWorkflow2Child

SomeWorkflow2Child executes a child workflow. If options not present, they are taken from the context.

func (SomeWorkflow2ChildRun) Get

Get returns the completed workflow value, waiting if necessary.

func (SomeWorkflow2ChildRun) Select

Select adds this completion to the selector. Callback can be nil.

func (SomeWorkflow2ChildRun) SelectStart

SelectStart adds waiting for start to the selector. Callback can be nil.

func (SomeWorkflow2ChildRun) SomeSignal1

SomeSignal1 is a signal.

func (SomeWorkflow2ChildRun) WaitStart

WaitStart waits for the child workflow to start.

type SomeWorkflow2Impl

type SomeWorkflow2Impl interface {
	Run(workflow.Context) error
}

SomeWorkflow2 does some workflow thing.

type SomeWorkflow2Input

type SomeWorkflow2Input struct {
	SomeSignal1 SomeSignal1
}

SomeWorkflow2Input is input provided to SomeWorkflow2Impl.Run.

type SomeWorkflow2Run

type SomeWorkflow2Run interface {
	// ID is the workflow ID.
	ID() string

	// RunID is the workflow run ID.
	RunID() string

	// Get returns the completed workflow value, waiting if necessary.
	Get(ctx context.Context) error

	// SomeSignal1 is a signal.
	SomeSignal1(ctx context.Context) error
}

SomeWorkflow2Run represents an execution of SomeWorkflow2.

type SomeWorkflow3ChildRun

type SomeWorkflow3ChildRun struct{ Future workflow.ChildWorkflowFuture }

SomeWorkflow3ChildRun is a future for the child workflow.

func SomeWorkflow3Child

SomeWorkflow3Child executes a child workflow. If options not present, they are taken from the context.

func (SomeWorkflow3ChildRun) Get

Get returns the completed workflow value, waiting if necessary.

func (SomeWorkflow3ChildRun) Select

Select adds this completion to the selector. Callback can be nil.

func (SomeWorkflow3ChildRun) SelectStart

SelectStart adds waiting for start to the selector. Callback can be nil.

func (SomeWorkflow3ChildRun) SomeSignal2

SomeSignal2 is a signal.

func (SomeWorkflow3ChildRun) WaitStart

WaitStart waits for the child workflow to start.

type SomeWorkflow3Impl

type SomeWorkflow3Impl interface {
	Run(workflow.Context) error
}

SomeWorkflow3 does some workflow thing.

type SomeWorkflow3Input

type SomeWorkflow3Input struct {
	Req         *SomeWorkflow3Request
	SomeSignal2 SomeSignal2
}

SomeWorkflow3Input is input provided to SomeWorkflow3Impl.Run.

type SomeWorkflow3Request

type SomeWorkflow3Request struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	RequestVal string `protobuf:"bytes,2,opt,name=request_val,json=requestVal,proto3" json:"request_val,omitempty"`
	// contains filtered or unexported fields
}

func (*SomeWorkflow3Request) Descriptor deprecated

func (*SomeWorkflow3Request) Descriptor() ([]byte, []int)

Deprecated: Use SomeWorkflow3Request.ProtoReflect.Descriptor instead.

func (*SomeWorkflow3Request) GetId

func (x *SomeWorkflow3Request) GetId() string

func (*SomeWorkflow3Request) GetRequestVal

func (x *SomeWorkflow3Request) GetRequestVal() string

func (*SomeWorkflow3Request) ProtoMessage

func (*SomeWorkflow3Request) ProtoMessage()

func (*SomeWorkflow3Request) ProtoReflect

func (x *SomeWorkflow3Request) ProtoReflect() protoreflect.Message

func (*SomeWorkflow3Request) Reset

func (x *SomeWorkflow3Request) Reset()

func (*SomeWorkflow3Request) String

func (x *SomeWorkflow3Request) String() string

type SomeWorkflow3Run

type SomeWorkflow3Run interface {
	// ID is the workflow ID.
	ID() string

	// RunID is the workflow run ID.
	RunID() string

	// Get returns the completed workflow value, waiting if necessary.
	Get(ctx context.Context) error

	// SomeSignal2 is a signal.
	SomeSignal2(ctx context.Context, req *SomeSignal2Request) error
}

SomeWorkflow3Run represents an execution of SomeWorkflow3.

Jump to

Keyboard shortcuts

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