workflowsv1connect

package
v0.0.0-...-68a25c6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JobServiceSubmitJobProcedure is the fully-qualified name of the JobService's SubmitJob RPC.
	JobServiceSubmitJobProcedure = "/workflows.v1.JobService/SubmitJob"
	// JobServiceGetJobProcedure is the fully-qualified name of the JobService's GetJob RPC.
	JobServiceGetJobProcedure = "/workflows.v1.JobService/GetJob"
	// JobServiceRetryJobProcedure is the fully-qualified name of the JobService's RetryJob RPC.
	JobServiceRetryJobProcedure = "/workflows.v1.JobService/RetryJob"
	// JobServiceCancelJobProcedure is the fully-qualified name of the JobService's CancelJob RPC.
	JobServiceCancelJobProcedure = "/workflows.v1.JobService/CancelJob"
	// JobServiceVisualizeJobProcedure is the fully-qualified name of the JobService's VisualizeJob RPC.
	JobServiceVisualizeJobProcedure = "/workflows.v1.JobService/VisualizeJob"
	// JobServiceListJobsProcedure is the fully-qualified name of the JobService's ListJobs RPC.
	JobServiceListJobsProcedure = "/workflows.v1.JobService/ListJobs"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// RecurrentTaskServiceListStorageLocationsProcedure is the fully-qualified name of the
	// RecurrentTaskService's ListStorageLocations RPC.
	RecurrentTaskServiceListStorageLocationsProcedure = "/workflows.v1.RecurrentTaskService/ListStorageLocations"
	// RecurrentTaskServiceGetStorageLocationProcedure is the fully-qualified name of the
	// RecurrentTaskService's GetStorageLocation RPC.
	RecurrentTaskServiceGetStorageLocationProcedure = "/workflows.v1.RecurrentTaskService/GetStorageLocation"
	// RecurrentTaskServiceCreateStorageLocationProcedure is the fully-qualified name of the
	// RecurrentTaskService's CreateStorageLocation RPC.
	RecurrentTaskServiceCreateStorageLocationProcedure = "/workflows.v1.RecurrentTaskService/CreateStorageLocation"
	// RecurrentTaskServiceDeleteStorageLocationProcedure is the fully-qualified name of the
	// RecurrentTaskService's DeleteStorageLocation RPC.
	RecurrentTaskServiceDeleteStorageLocationProcedure = "/workflows.v1.RecurrentTaskService/DeleteStorageLocation"
	// RecurrentTaskServiceListRecurrentTasksProcedure is the fully-qualified name of the
	// RecurrentTaskService's ListRecurrentTasks RPC.
	RecurrentTaskServiceListRecurrentTasksProcedure = "/workflows.v1.RecurrentTaskService/ListRecurrentTasks"
	// RecurrentTaskServiceGetRecurrentTaskProcedure is the fully-qualified name of the
	// RecurrentTaskService's GetRecurrentTask RPC.
	RecurrentTaskServiceGetRecurrentTaskProcedure = "/workflows.v1.RecurrentTaskService/GetRecurrentTask"
	// RecurrentTaskServiceCreateRecurrentTaskProcedure is the fully-qualified name of the
	// RecurrentTaskService's CreateRecurrentTask RPC.
	RecurrentTaskServiceCreateRecurrentTaskProcedure = "/workflows.v1.RecurrentTaskService/CreateRecurrentTask"
	// RecurrentTaskServiceUpdateRecurrentTaskProcedure is the fully-qualified name of the
	// RecurrentTaskService's UpdateRecurrentTask RPC.
	RecurrentTaskServiceUpdateRecurrentTaskProcedure = "/workflows.v1.RecurrentTaskService/UpdateRecurrentTask"
	// RecurrentTaskServiceDeleteRecurrentTaskProcedure is the fully-qualified name of the
	// RecurrentTaskService's DeleteRecurrentTask RPC.
	RecurrentTaskServiceDeleteRecurrentTaskProcedure = "/workflows.v1.RecurrentTaskService/DeleteRecurrentTask"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// TaskServiceNextTaskProcedure is the fully-qualified name of the TaskService's NextTask RPC.
	TaskServiceNextTaskProcedure = "/workflows.v1.TaskService/NextTask"
	// TaskServiceTaskFailedProcedure is the fully-qualified name of the TaskService's TaskFailed RPC.
	TaskServiceTaskFailedProcedure = "/workflows.v1.TaskService/TaskFailed"
	// TaskServiceExtendTaskLeaseProcedure is the fully-qualified name of the TaskService's
	// ExtendTaskLease RPC.
	TaskServiceExtendTaskLeaseProcedure = "/workflows.v1.TaskService/ExtendTaskLease"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// WorkflowsServiceCreateClusterProcedure is the fully-qualified name of the WorkflowsService's
	// CreateCluster RPC.
	WorkflowsServiceCreateClusterProcedure = "/workflows.v1.WorkflowsService/CreateCluster"
	// WorkflowsServiceGetClusterProcedure is the fully-qualified name of the WorkflowsService's
	// GetCluster RPC.
	WorkflowsServiceGetClusterProcedure = "/workflows.v1.WorkflowsService/GetCluster"
	// WorkflowsServiceDeleteClusterProcedure is the fully-qualified name of the WorkflowsService's
	// DeleteCluster RPC.
	WorkflowsServiceDeleteClusterProcedure = "/workflows.v1.WorkflowsService/DeleteCluster"
	// WorkflowsServiceListClustersProcedure is the fully-qualified name of the WorkflowsService's
	// ListClusters RPC.
	WorkflowsServiceListClustersProcedure = "/workflows.v1.WorkflowsService/ListClusters"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// DiagramServiceName is the fully-qualified name of the DiagramService service.
	DiagramServiceName = "workflows.v1.DiagramService"
)
View Source
const (
	// DiagramServiceRenderProcedure is the fully-qualified name of the DiagramService's Render RPC.
	DiagramServiceRenderProcedure = "/workflows.v1.DiagramService/Render"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// JobServiceName is the fully-qualified name of the JobService service.
	JobServiceName = "workflows.v1.JobService"
)
View Source
const (
	// RecurrentTaskServiceName is the fully-qualified name of the RecurrentTaskService service.
	RecurrentTaskServiceName = "workflows.v1.RecurrentTaskService"
)
View Source
const (
	// TaskServiceName is the fully-qualified name of the TaskService service.
	TaskServiceName = "workflows.v1.TaskService"
)
View Source
const (
	// WorkflowsServiceName is the fully-qualified name of the WorkflowsService service.
	WorkflowsServiceName = "workflows.v1.WorkflowsService"
)

Variables

This section is empty.

Functions

func NewDiagramServiceHandler

func NewDiagramServiceHandler(svc DiagramServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewDiagramServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewJobServiceHandler

func NewJobServiceHandler(svc JobServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewJobServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewRecurrentTaskServiceHandler

func NewRecurrentTaskServiceHandler(svc RecurrentTaskServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewRecurrentTaskServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewTaskServiceHandler

func NewTaskServiceHandler(svc TaskServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewTaskServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewWorkflowsServiceHandler

func NewWorkflowsServiceHandler(svc WorkflowsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewWorkflowsServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type DiagramServiceClient

type DiagramServiceClient interface {
	Render(context.Context, *connect.Request[v1.RenderDiagramRequest]) (*connect.Response[v1.Diagram], error)
}

DiagramServiceClient is a client for the workflows.v1.DiagramService service.

func NewDiagramServiceClient

func NewDiagramServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) DiagramServiceClient

NewDiagramServiceClient constructs a client for the workflows.v1.DiagramService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type DiagramServiceHandler

type DiagramServiceHandler interface {
	Render(context.Context, *connect.Request[v1.RenderDiagramRequest]) (*connect.Response[v1.Diagram], error)
}

DiagramServiceHandler is an implementation of the workflows.v1.DiagramService service.

type JobServiceClient

JobServiceClient is a client for the workflows.v1.JobService service.

func NewJobServiceClient

func NewJobServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) JobServiceClient

NewJobServiceClient constructs a client for the workflows.v1.JobService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type RecurrentTaskServiceClient

type RecurrentTaskServiceClient interface {
	// ListStorageLocations lists all the storage buckets that are available for use as bucket triggers.
	ListStorageLocations(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.StorageLocations], error)
	// GetStorageLocation gets a storage location by its ID.
	GetStorageLocation(context.Context, *connect.Request[v1.UUID]) (*connect.Response[v1.StorageLocation], error)
	// CreateStorageLocation creates a new storage bucket.
	CreateStorageLocation(context.Context, *connect.Request[v1.StorageLocation]) (*connect.Response[v1.StorageLocation], error)
	// DeleteStorageLocation deletes a storage location.
	DeleteStorageLocation(context.Context, *connect.Request[v1.UUID]) (*connect.Response[emptypb.Empty], error)
	// ListRecurrentTasks lists all the recurrent tasks that are currently registered in a namespace.
	ListRecurrentTasks(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.RecurrentTasks], error)
	// GetRecurrentTask gets a recurrent task by its ID.
	GetRecurrentTask(context.Context, *connect.Request[v1.UUID]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// CreateRecurrentTask creates a new recurrent task in a namespace.
	CreateRecurrentTask(context.Context, *connect.Request[v1.RecurrentTaskPrototype]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// UpdateRecurrentTask updates a recurrent task in a namespace.
	UpdateRecurrentTask(context.Context, *connect.Request[v1.RecurrentTaskPrototype]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// DeleteRecurrentTask deletes a recurrent task from a namespace.
	DeleteRecurrentTask(context.Context, *connect.Request[v1.UUID]) (*connect.Response[emptypb.Empty], error)
}

RecurrentTaskServiceClient is a client for the workflows.v1.RecurrentTaskService service.

func NewRecurrentTaskServiceClient

func NewRecurrentTaskServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RecurrentTaskServiceClient

NewRecurrentTaskServiceClient constructs a client for the workflows.v1.RecurrentTaskService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type RecurrentTaskServiceHandler

type RecurrentTaskServiceHandler interface {
	// ListStorageLocations lists all the storage buckets that are available for use as bucket triggers.
	ListStorageLocations(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.StorageLocations], error)
	// GetStorageLocation gets a storage location by its ID.
	GetStorageLocation(context.Context, *connect.Request[v1.UUID]) (*connect.Response[v1.StorageLocation], error)
	// CreateStorageLocation creates a new storage bucket.
	CreateStorageLocation(context.Context, *connect.Request[v1.StorageLocation]) (*connect.Response[v1.StorageLocation], error)
	// DeleteStorageLocation deletes a storage location.
	DeleteStorageLocation(context.Context, *connect.Request[v1.UUID]) (*connect.Response[emptypb.Empty], error)
	// ListRecurrentTasks lists all the recurrent tasks that are currently registered in a namespace.
	ListRecurrentTasks(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.RecurrentTasks], error)
	// GetRecurrentTask gets a recurrent task by its ID.
	GetRecurrentTask(context.Context, *connect.Request[v1.UUID]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// CreateRecurrentTask creates a new recurrent task in a namespace.
	CreateRecurrentTask(context.Context, *connect.Request[v1.RecurrentTaskPrototype]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// UpdateRecurrentTask updates a recurrent task in a namespace.
	UpdateRecurrentTask(context.Context, *connect.Request[v1.RecurrentTaskPrototype]) (*connect.Response[v1.RecurrentTaskPrototype], error)
	// DeleteRecurrentTask deletes a recurrent task from a namespace.
	DeleteRecurrentTask(context.Context, *connect.Request[v1.UUID]) (*connect.Response[emptypb.Empty], error)
}

RecurrentTaskServiceHandler is an implementation of the workflows.v1.RecurrentTaskService service.

type TaskServiceClient

type TaskServiceClient interface {
	// NextTask marks a task as computed and asks for the next task to run.
	// If no task marked as computed is sent, it is assumed that the task runner just started up or was idling so
	// the task server will send a task to run using a work-stealing algorithm.
	// If a task marked as computed is sent, the task server will send a next task to run using a depth first execution
	// algorithm, and only fall back to work-stealing if otherwise no tasks are available.
	// If the next_task_to_run field of the request is not set, a next task will never be returned, but a task
	// can still be marked as computed this way.
	NextTask(context.Context, *connect.Request[v1.NextTaskRequest]) (*connect.Response[v1.NextTaskResponse], error)
	// TaskFailed tells the task server that we have failed to compute a task.
	// The task server will then mark the task as queued or failed, depending on the retry policy,
	// and possibly cancel the job.
	// If a task runner wants to continue executing tasks, it should afterwards fetch a new one using GetTaskToRun.
	TaskFailed(context.Context, *connect.Request[v1.TaskFailedRequest]) (*connect.Response[v1.TaskStateResponse], error)
	// ExtendTaskLease is called by the task runner to extend the lease on a task.
	// On success, the response will contain the new lease expiration time.
	// If the task does not need to be extended, the response will be empty.
	ExtendTaskLease(context.Context, *connect.Request[v1.TaskLeaseRequest]) (*connect.Response[v1.TaskLease], error)
}

TaskServiceClient is a client for the workflows.v1.TaskService service.

func NewTaskServiceClient

func NewTaskServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) TaskServiceClient

NewTaskServiceClient constructs a client for the workflows.v1.TaskService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type TaskServiceHandler

type TaskServiceHandler interface {
	// NextTask marks a task as computed and asks for the next task to run.
	// If no task marked as computed is sent, it is assumed that the task runner just started up or was idling so
	// the task server will send a task to run using a work-stealing algorithm.
	// If a task marked as computed is sent, the task server will send a next task to run using a depth first execution
	// algorithm, and only fall back to work-stealing if otherwise no tasks are available.
	// If the next_task_to_run field of the request is not set, a next task will never be returned, but a task
	// can still be marked as computed this way.
	NextTask(context.Context, *connect.Request[v1.NextTaskRequest]) (*connect.Response[v1.NextTaskResponse], error)
	// TaskFailed tells the task server that we have failed to compute a task.
	// The task server will then mark the task as queued or failed, depending on the retry policy,
	// and possibly cancel the job.
	// If a task runner wants to continue executing tasks, it should afterwards fetch a new one using GetTaskToRun.
	TaskFailed(context.Context, *connect.Request[v1.TaskFailedRequest]) (*connect.Response[v1.TaskStateResponse], error)
	// ExtendTaskLease is called by the task runner to extend the lease on a task.
	// On success, the response will contain the new lease expiration time.
	// If the task does not need to be extended, the response will be empty.
	ExtendTaskLease(context.Context, *connect.Request[v1.TaskLeaseRequest]) (*connect.Response[v1.TaskLease], error)
}

TaskServiceHandler is an implementation of the workflows.v1.TaskService service.

type UnimplementedDiagramServiceHandler

type UnimplementedDiagramServiceHandler struct{}

UnimplementedDiagramServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedJobServiceHandler

type UnimplementedJobServiceHandler struct{}

UnimplementedJobServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedJobServiceHandler) GetJob

func (UnimplementedJobServiceHandler) SubmitJob

func (UnimplementedJobServiceHandler) VisualizeJob

type UnimplementedRecurrentTaskServiceHandler

type UnimplementedRecurrentTaskServiceHandler struct{}

UnimplementedRecurrentTaskServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedRecurrentTaskServiceHandler) CreateStorageLocation

func (UnimplementedRecurrentTaskServiceHandler) DeleteRecurrentTask

func (UnimplementedRecurrentTaskServiceHandler) DeleteStorageLocation

func (UnimplementedRecurrentTaskServiceHandler) GetRecurrentTask

func (UnimplementedRecurrentTaskServiceHandler) GetStorageLocation

func (UnimplementedRecurrentTaskServiceHandler) ListRecurrentTasks

func (UnimplementedRecurrentTaskServiceHandler) ListStorageLocations

type UnimplementedTaskServiceHandler

type UnimplementedTaskServiceHandler struct{}

UnimplementedTaskServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedTaskServiceHandler) ExtendTaskLease

type UnimplementedWorkflowsServiceHandler

type UnimplementedWorkflowsServiceHandler struct{}

UnimplementedWorkflowsServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedWorkflowsServiceHandler) CreateCluster

func (UnimplementedWorkflowsServiceHandler) GetCluster

type WorkflowsServiceClient

WorkflowsServiceClient is a client for the workflows.v1.WorkflowsService service.

func NewWorkflowsServiceClient

func NewWorkflowsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WorkflowsServiceClient

NewWorkflowsServiceClient constructs a client for the workflows.v1.WorkflowsService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type WorkflowsServiceHandler

WorkflowsServiceHandler is an implementation of the workflows.v1.WorkflowsService service.

Jump to

Keyboard shortcuts

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