Help us shape the future of Go! Take the 2026 Go Developer Survey

workflows

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 32 Imported by: 0

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

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 New

func New(h *core.Hub) *Service

New creates the service.

func (*Service) CancelExecution

func (s *Service) CancelExecution(_ context.Context, r *epb.CancelExecutionRequest) (*epb.Execution, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) CreateExecution

func (s *Service) CreateExecution(_ context.Context, r *epb.CreateExecutionRequest) (*epb.Execution, error)

func (*Service) CreateWorkflow

func (*Service) DeleteWorkflow

func (*Service) GetExecution

func (s *Service) GetExecution(_ context.Context, r *epb.GetExecutionRequest) (*epb.Execution, error)

func (*Service) GetWorkflow

func (s *Service) GetWorkflow(_ context.Context, r *wpb.GetWorkflowRequest) (*wpb.Workflow, error)

func (*Service) Info

func (s *Service) Info() core.Info

func (*Service) ListExecutions

func (*Service) ListWorkflows

func (*Service) Load

func (s *Service) Load(b []byte) error

Load restores what Save wrote. An execution that was running is marked FAILED: its run is gone.

func (*Service) RegisterGRPC

func (s *Service) RegisterGRPC(g *grpc.Server)

func (*Service) Reset

func (s *Service) Reset()

Reset stops the running executions and forgets everything.

func (*Service) Save

func (s *Service) Save() ([]byte, error)

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Service) UpdateWorkflow

Jump to

Keyboard shortcuts

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