Documentation
¶
Overview ¶
Package workflows emulates Google Cloud Workflows (v1) and the Workflow Executions API (v1) over gRPC and their REST mirrors. An execution really runs the workflow's YAML: main and subworkflows, assign, call (http.*, sys.*, subworkflows), switch, for, try/except/retry, return, raise and next, with ${...} expressions and the common standard library functions. A step type, connector or function outside that subset (parallel, googleapis.*, events.*) fails the execution with an error that names it.
Index ¶
- type Service
- func (s *Service) CancelExecution(_ context.Context, r *epb.CancelExecutionRequest) (*epb.Execution, error)
- func (s *Service) Close() error
- func (s *Service) CreateExecution(_ context.Context, r *epb.CreateExecutionRequest) (*epb.Execution, error)
- func (s *Service) CreateWorkflow(_ context.Context, r *wpb.CreateWorkflowRequest) (*longrunningpb.Operation, error)
- func (s *Service) DeleteWorkflow(_ context.Context, r *wpb.DeleteWorkflowRequest) (*longrunningpb.Operation, error)
- func (s *Service) GetExecution(_ context.Context, r *epb.GetExecutionRequest) (*epb.Execution, error)
- func (s *Service) GetWorkflow(_ context.Context, r *wpb.GetWorkflowRequest) (*wpb.Workflow, error)
- func (s *Service) Info() core.Info
- func (s *Service) ListExecutions(_ context.Context, r *epb.ListExecutionsRequest) (*epb.ListExecutionsResponse, error)
- func (s *Service) ListWorkflowRevisions(_ context.Context, r *wpb.ListWorkflowRevisionsRequest) (*wpb.ListWorkflowRevisionsResponse, error)
- func (s *Service) ListWorkflows(_ context.Context, r *wpb.ListWorkflowsRequest) (*wpb.ListWorkflowsResponse, error)
- func (s *Service) Load(b []byte) error
- func (s *Service) RegisterGRPC(g *grpc.Server)
- func (s *Service) Reset()
- func (s *Service) Save() ([]byte, error)
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Service) UpdateWorkflow(_ context.Context, r *wpb.UpdateWorkflowRequest) (*longrunningpb.Operation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
wpb.UnimplementedWorkflowsServer
epb.UnimplementedExecutionsServer
// contains filtered or unexported fields
}
Service serves both Workflows and Workflow Executions.
func (*Service) CancelExecution ¶
func (*Service) CreateExecution ¶
func (*Service) CreateWorkflow ¶
func (s *Service) CreateWorkflow(_ context.Context, r *wpb.CreateWorkflowRequest) (*longrunningpb.Operation, error)
func (*Service) DeleteWorkflow ¶
func (s *Service) DeleteWorkflow(_ context.Context, r *wpb.DeleteWorkflowRequest) (*longrunningpb.Operation, error)
func (*Service) GetExecution ¶
func (*Service) GetWorkflow ¶
func (*Service) ListExecutions ¶
func (s *Service) ListExecutions(_ context.Context, r *epb.ListExecutionsRequest) (*epb.ListExecutionsResponse, error)
func (*Service) ListWorkflowRevisions ¶
func (s *Service) ListWorkflowRevisions(_ context.Context, r *wpb.ListWorkflowRevisionsRequest) (*wpb.ListWorkflowRevisionsResponse, error)
func (*Service) ListWorkflows ¶
func (s *Service) ListWorkflows(_ context.Context, r *wpb.ListWorkflowsRequest) (*wpb.ListWorkflowsResponse, error)
func (*Service) Load ¶
Load restores what Save wrote. An execution that was running is marked FAILED: its run is gone.
func (*Service) RegisterGRPC ¶
func (*Service) Reset ¶
func (s *Service) Reset()
Reset stops the running executions and forgets everything.
func (*Service) UpdateWorkflow ¶
func (s *Service) UpdateWorkflow(_ context.Context, r *wpb.UpdateWorkflowRequest) (*longrunningpb.Operation, error)