Documentation ¶
Index ¶
- func FetchRandomDogActivity(ctx context.Context, params map[string]interface{}) (*schema.DocumentCreate, error)
- func FetchRandomUnsplashActivity(ctx context.Context, params map[string]interface{}) (*schema.DocumentCreate, error)
- func InitActivity(ctx context.Context, params map[string]interface{}) (string, error)
- func RandomDogWorkflow(ctx workflow.Context, params map[string]interface{}) (*schema.WorkflowInstanceUpdate, error)
- func RandomUnsplashWorkflow(ctx workflow.Context, params map[string]interface{}) (*schema.WorkflowInstanceUpdate, error)
- type WorkflowClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchRandomDogActivity ¶
func FetchRandomDogActivity(ctx context.Context, params map[string]interface{}) (*schema.DocumentCreate, error)
FetchRandomDogActivity calls the dog.ceo api for a random dog picture
func FetchRandomUnsplashActivity ¶
func FetchRandomUnsplashActivity(ctx context.Context, params map[string]interface{}) (*schema.DocumentCreate, error)
FetchRandomUnsplashActivity calls unsplash to get a random photo
func InitActivity ¶
InitActivity
func RandomDogWorkflow ¶
func RandomDogWorkflow(ctx workflow.Context, params map[string]interface{}) (*schema.WorkflowInstanceUpdate, error)
RandomDogWorkflow is a Hello World workflow definition.
func RandomUnsplashWorkflow ¶
func RandomUnsplashWorkflow(ctx workflow.Context, params map[string]interface{}) (*schema.WorkflowInstanceUpdate, error)
RandomUnsplashWorkflow is a Hello World workflow definition.
Types ¶
type WorkflowClient ¶
type WorkflowClient struct {
// contains filtered or unexported fields
}
WorkflowClient holds the temporal client and queue
func NewWorkflowStarter ¶
func NewWorkflowStarter(hostPort, queue string) (*WorkflowClient, error)
NewWorkflowStarter returns a new workflow starter with a temporal client
func (*WorkflowClient) Query ¶
func (ws *WorkflowClient) Query(workflowID, instanceID string) *schema.WorkflowInstanceUpdate
Query a workflow status
func (*WorkflowClient) Start ¶
func (ws *WorkflowClient) Start(workflowID string, params map[string]interface{}) *schema.WorkflowInstanceUpdate
Start kicks of a workflow
func (*WorkflowClient) StartWorkflowWorker ¶
func (ws *WorkflowClient) StartWorkflowWorker(ctx context.Context)
StartWorkflowWorker connects to temporal and listens for workflows
Click to show internal directories.
Click to hide internal directories.